Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTextField in JInternalFrame

 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the InternalFrameListener interface. With it, you can perform actions when an internal frame is closed, hidden, etc.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic