Ok, I'm not so good at Java / Swing and I have a problem. My application throws this error: "Exception in thread" AWT-EventQueue-0 "java.awt.IllegalComponentStateException: frame is available for display". Google does not generate much information about this error, and a quick search of StackOverflow does not show anything yet.
What I'm trying to do: just implement translucent windows using code from tutorials. It. I plan to use this as a general window for displaying notifications such as "This program has not been launched in 30 days" next to the system tray.
Are there any experienced Java / Swing gurus who can detect my beginner error?
Thanks.
package energizingemerald; import java.awt.*; import javax.swing.*; import static java.awt.GraphicsDevice.WindowTranslucency.*; public class NotificationFrame extends javax.swing.JFrame { public NotificationFrame() { initComponents(); this.setLayout(new GridBagLayout()); this.setUndecorated(true); this.setSize(300,200); this.setLocationRelativeTo(null); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setOpacity(0.50f); } @SuppressWarnings("unchecked")
java swing nimbus
user978122
source share