• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

query

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
question is that when we click on the close button of the JInternalframe a save filedialog box is popped up we want that if we click on the save option the changes made must be saved in the specified file but when we click on the cancel option or close button of the Save filedialog box, then, only the dialog box should get disposed not the internal frame so that if the user wants to make some more changes he can do so and then save it afterwards
but when we click on the cancel option of the Save FileDialog the JInternal Frame and the File Dialog both gets disposed.
please give us the solution to get rid of it
we have tried hide() and dispose() method of the dialog box
but could not find the solution
thank u
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hi,
I think u should take help of the interface called VetoableChangeListener. ur JInternalFrame class extension should implement this interface and add this listener using addVetoableChangeListener() method. this listener "vetoes" the closing of JInternalFrame if customized to do so.
explore it!!
hope it helps u.
regards
Nikhil.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic