aspose file tools*
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextField in JInternalFrame" Watch "JTextField in JInternalFrame" New topic
Author

JTextField in JInternalFrame

Aravind Prasad
Ranch Hand

Joined: Dec 28, 2005
Posts: 263
Dear Ranchers,
In my Java Swing application, I've a
JFrame
- 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..

Thanks/Regards

Aravind Prasad
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19696
    
  20

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


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
wood burning stoves
 
subject: JTextField in JInternalFrame