Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextField in JInternalFrame  RSS feed

 
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
 
Sheriff
Posts: 21327
87
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.
 
We begin by testing your absorbancy by exposing you to this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!