Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Minimise restoring JFrame

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
does anyone know a way of Minimising and restoring the JFrame to its original screen state programically.
Basically, what I want to do is if my JFrame is minimse in the dock, when an event occurs I would like to Pop up the JFrame, either maximse it or restore it to is orginal size before it was minimise.
I have done it in a very unclean manner and have cause my program to deadlock. I can't view the JFrame from clicking on the icon on the dock.
here is some code that i used to minimise

here is an error i get:
java[889] Java couldn't paint in Java_apple_awt_CRenderer_doRect, no focused view.
desparately scratching her head,
Sarone
[ January 29, 2004: Message edited by: Sarone Thach ]
 
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you able to use JDK 1.4? It seems to have much easier to use methods in the Frame class. You probably also need a WindowListener.
 
Sarone Thach
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I can use JKD 1.4
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!