Home » Tag Archives: Swing

Tag Archives: Swing

Call to verify responsiveness of your JavaFX UIs

javafx-logo

Recently Jim Weaver installed my little picture indexing app “picmodo” for a demo on his Surface Pro and the GUI became a pice of junk. Obviously the basic font size of JavaFX on a Windows Tablet is to high:                 I assume, too absolute sizes and positions are not always the best idea, ...

Read More »

Swing and JavaFX: working with JFXPanel

javafx-logo

I soon will have to deal with JavaFX in a Swing based fat client – oh sorry, of course I meant “multi-layered rich-client”! So this brings me to have a look at the JFXPanel. The JFXPanel is a javax.swing.JComponent to embed JavaFX content into Swing-UIs. A JFXPanel can be used similar to a JPanel and can be accessed via the ...

Read More »

Programming a simple slot machine game using Java

java-logo

No mat­ter how sim­ple or com­plex the game is, Java can do the job! On this post, let’s take a look at how begin­ners of Java pro­gram­ming can make a sim­ple, yet fully func­tional slot machine. Slot machines have been around for a long time, but its enter­tain­ment value doesn’t seem to fade one bit. Inter­Casino, the first web­site to offer ...

Read More »

JavaFX Tip 9: Do Not Mix Swing / JavaFX

javafx-logo

The JavaFX team has tried very hard to convince us that migrating from Swing to JavaFX is easy because of the option to embed Swing content in a JavaFX UI and vice versa. I must admit that I never tried it myself but based on the feedback I am getting from my customers I can only recommend to not mix ...

Read More »

115 Java Interview Questions and Answers – The ULTIMATE List (PDF Download)

java-logo

In this tutorial we will discuss about different types of questions that can be used in a Java interview, in order for the employer to test your skills in Java and object-oriented programming in general. In the following sections we will discuss about object-oriented programming and its characteristics, general questions regarding Java and its functionality, collections in Java, garbage collectors, ...

Read More »

More Units with MoreUnit

junit-logo

Just over a year ago I wrote a post about working with JUnit in Eclipse. One of the commenters recommended MoreUnit in order to increase testing efficiency even more. Giving it a try I was delighted and the plugin’s keyboard shortcuts were immediately memorized by my autonomic nervous system… Additionally after using MoreUnit for a while I recognized a slight ...

Read More »

Java 7 Swing: Creating Translucent and Shaped Windows

java-logo

Java 7 Swing supports windows with transparency and non-rectangular shapes. The following screenshot shows a circular window created with 75% opacity. You can create a translucent window by altering its opacity using the setOpacity method on a JFrame. Note that you can only create translucent windows if the underlying operating system supports them. Also, ensure that the window is undecorated ...

Read More »

Integrating JavaFX and Swing (Revised)

javafx-logo

I’ve just finished rewriting a component of my app that was using Swing and now is using JavaFX, I’ve ended up with a JavaFX component that integrates with the larger swing app. It is a large app and the rewrite took me a while, in the end everything worked fine and I’m glad I did it. Reasons you might want to do ...

Read More »

Multi-threading in Java Swing with SwingWorker

java-logo

If you’re writing a desktop or Java Web Start program in Java using Swing, you might feel the need to run some stuff in the background by creating your own threads. There’s nothing stopping you from using standard multi-threading techniques in Swing, and the usual considerations apply. If you have multiple threads accessing the same variables, you’ll need to use ...

Read More »

Create new message notification pop up in Java

java-duke-logo

First create JFrame to work as pop up. Add some JLabels in it to contain information and assign them at proper location to look like a notification message. A sample code is given below: String message = 'You got a new notification message. Isn't it awesome to have such a notification message.'; String header = 'This is header of notification ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.