wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JTextField in JInternalFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextField in JInternalFrame" Watch "JTextField in JInternalFrame" New topic

JTextField in JInternalFrame

Aravind Prasad
Ranch Hand

Joined: Dec 28, 2005
Posts: 263
Dear Ranchers,
In my Java Swing application, I've a
- JMenu
- JToolBar
- JDesktopPane
- JInternalFrame
- JPanel
- JTextField

This is the format of my MDI Form. When the mdi is called, I put the JInternalFrame.setVisible(false);

When an action is occured in JMenuItem, I'm putting the JInternalFrame.setVisible(true);

My problem is, When I enter a value in the JTextField and closes the JInternalFrame, the value appears there. The problem is, I'm hiding the internalframe after entering the value and unhiding it back when i want the internalframe.

Please advise me, how can I remove the values when I close the JInternalFrame. Also the default close operation of the JInternalFrame is "HIDE"

Please reply..


Aravind Prasad
Rob Spoor

Joined: Oct 27, 2005
Posts: 19649

Take a look at the InternalFrameListener interface. With it, you can perform actions when an internal frame is closed, hidden, etc.

How To Ask Questions How To Answer Questions
It is sorta covered in the JavaRanch Style Guide.
subject: JTextField in JInternalFrame
Similar Threads
JInternalFrame vs JDialog
Flicker in JInternalFrame
Problem with scrollpane and Jinternalframe
JFrame, Image/Graphics and JInternalFrame
JInternalFrame immediate closing