Close 2 « JFrame « Java Swing Q&A





1. not allowing resize of jframe and closing method of jframe    forums.oracle.com

is there a way to remove the top bar of a jframe so that it doesn't show the close, minimize, or maximize/restore buttons? I have looked over the tutorial and haven't been able to find anything on the web, thought someone could point me in the right direction or with some sample code Also when i display a jframe, I would ...

2. Close JFrame    forums.oracle.com

3. How to:pass an Object reference to another class?Close one GUI window only?    forums.oracle.com

Guest123 wrote: VERY sorry that the code is so long but once it is copy and pasted, you'll see that it is not bad... Perhaps for someone else it's short enough, but sorry it's way too long for me. In order to go through it and understand it, I would have to go through the code, remove all non-essential stuff, test ...

4. override closing function of a swing form    forums.oracle.com

5. open a jFrame on another jFrames close    forums.oracle.com

New to java I have 2 jFrames, frame1.java & frame2.java frame1 has a button which makes frame1 invisible and opens frame2. I can do the above. but when I close frame2 I want to re-open frame1. I do not want to use a button on frame2, I want to use the X at the top right of the jFrame. I'm using ...

6. closing JFrame    forums.oracle.com

7. Want my JFrame to be the *only* one that can end the program when closed    forums.oracle.com

Hmmm... I see how I could use that the run a command in a separate process, but how would I replicate my code above using Runtime or ProcessBuilder? I guess in the specific "main method" case, I could probably find the jar that I need and run "java -jar ...", but that depends on the jar having been set up with ...

8. Why my system tray application terminates when JFrame is closed???    forums.oracle.com

Hi, I am using JDK 1.6 with Netbeans 5.5 and currently trying to make an system tray application. I have one main class which runs as a system tray application and one JFrame class which will be shown when user selects a menu item from system tray. So far so good but a small problem. When the JFrame form is closed, ...

9. JFrame close operation...    forums.oracle.com

Swing related questions should be posted in the Swing forum. I have a jframe, which has a button in it which opens another JFrame, You should probably be creating a modal JDialog, not a JFrame. Read the JDialog API and follow the link to the Swing tutorial on "How to Make Dialogs" for more information. If you need further help then ...





10. How to do a last command before closing JFrame?    forums.oracle.com

Hi, I'm working on a GUI, and there is a TextArea, which is set to the System.out.print commands, and i'd like it to save into a file, when i close the jframe, by pressing the X in the upper right corner. I've made a working saving void, the only problem is: - How can i do it so that i can ...

11. closing a jframe and passing the variable    forums.oracle.com

Hello. I am a seasoned Java programmer, but just learning swing. What I am trying to do is create a wizard. I have a jframe, and I want the user to be able to click a button and a new jframe pops up, with a textfield and a button on it. The user enters some text into the text field and ...

12. Closing a JFrame (Not The Primary JFrame In The Application    forums.oracle.com

public ProcessReceivers() { JFrame jfrm = new JFrame("Global Retail Management " + "Customs Management System (Review/Process Receivers)"); jfrm.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); jfrm.setSize(800,600); model = new DefaultTableModel(columnNames,0); JTable table = new JTable(model); JScrollPane scrollpane = new JScrollPane(table); JPanel panel1 = new JPanel(); panel1.setBackground(Color.CYAN); textField = new JTextField(25); JButton button1 = new JButton("Process"); button1.addActionListener(this); combo1 = new JComboBox(options); combo2 = new JComboBox(estatus); combo1.setBackground(Color.WHITE); combo2.setBackground(Color.WHITE); JLabel label1 ...

13. JFrame close operation    forums.oracle.com

In the future, Swing related questions should be posted in the Swing forum. Don't use a JFrame as the child. The code after the setVisible(...) is executed immediately, not when the frame is closed. Use a modal JDialog and the statement after the dialog.setVisible(...) will not be executed until you close the dialog.

14. closing jframe    forums.oracle.com

1) Swing related questions should be posted in the Swing forum. 2) Your posted code can't be used by people who don't use an IDE or JDK6, since GroupLayout is not a standared layout until then. 3) Your question is about a Timer, so why is your example 100 lines long? Post a demo with only the relevant code that can ...

15. closing multiple JFrames    forums.oracle.com