• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Swing SeaGlass UI L&F, resizing issue

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello my dears,

After Saturday (Sheldon Cooper) Laundry Night, Sunday is wonderful day for Java coding. But I have a serious* problem here with SeaGlass UI.

Background:
I need for my next project a little better Look and Feel than that which Java originally provide. I choosed to dive into SeaGlass L&F which seems to be pretty nice. However I encountered the problem. I can't prevent user of app from resizing and maximazing my JFrame. From what I found it is well-known issue in SeaGlass and it will be fixed in 2.1 version (what its stated here). Unfortunately, last available version is 2.0 and it looks like this project is abandoned - last update is one year old.

Question:
While setResizable(false) and setUndecorated(false) don't work at all (no effect), is there any work-around to stop user from resizing my JFrame? We can assume that targeted user of application is newbie to computers so he won't use any hacks and tricks to maximaze it (i.e. using Windows Task Manager). Basically I just need to deal with maximize button at the top of JFrame and manually resize using mouse.

My thoughts revolve around MouseListener or overwriting event fired when something is happening to JFrame.

*I have asked first on stackoverflow (I'm sorry!) and they didin't know answer. Since they are so horny on getting points for answer I assume that question is not easy.
 
Lukasz Jarocki
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have figuered it out.

JFrame must implement ComponentListener and in overridden componentResized method you must put that code:

 
reply
    Bookmark Topic Watch Topic
  • New Topic