Top "Jframe" questions

A JFrame is a component and top-level container of the JFC/Swing framework.

Java, JFrame: getWidth() returns 0

setExtendedState(getExtendedState()|JFrame.MAXIMIZED_BOTH); setResizable(false); setUndecorated(true); System.out.println("--------> "+getContentPane().getWidth()); //----> 0 why is …

java swing jframe
JButton expanding to take up entire frame/container

Hey everyone. I'm trying to make a swing GUI with a button and a label on it. im using a …

java user-interface swing jframe jbutton
Java center text in rectangle

I use drawString() method to draw string using Graphics, but I want to center my text in a rectangle. How …

java swing jframe drawstring
JavaFX 2.2 Stage always on top

I have a normal JFrame (one part of the app) and a second JavaFX window (I can't use a JFrame …

java javafx jframe always-on-top
JFrame theme and appearance

I have a swing application. Below is a small screenshot. OS: Win 7 What is irritating is the theme. I have …

java swing jframe look-and-feel
How to get parent for JDialog from JPanel

In my Swing app. I have a JFrame with few JPanels. One of it I use for placing another panels. …

java swing jframe jdialog
Import existing java project in eclipse but design view not exist for JFrame?

I import existing java project in eclipse: in eclipse: 1. go to File -> Import 2. General -> Existing Projects …

java eclipse swing jframe
Adding a new WindowListener to a JFrame

mainFrame.addWindowListener(new WindowListener() { @Override public void windowClosing(WindowEvent e) { if (JOptionPane.showConfirmDialog(mainFrame, "Are you sure you want to …

java swing jframe joptionpane windowlistener
Java - Is it possible to add a JMenuBar to a JFrame's decoration window?

I'm wondering if I can add a JMenuBar to a JFrame or JRootPane's Decoration window, or otherwise the border that …

java swing jframe frames jmenubar
Java Swing on high-DPI screen

I have a Java Swing program that uses the System Look And Feel: UIManager.setLookAndFeel (UIManager.getSystemLookAndFeelClassName ()); The problem is …

java swing fonts jframe