This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Swing SeaGlass UI L&F, resizing issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Swing SeaGlass UI L&F, resizing issue" Watch "Swing SeaGlass UI L&F, resizing issue" New topic
Author

Swing SeaGlass UI L&F, resizing issue

Lukasz Jarocki
Greenhorn

Joined: Jan 01, 2013
Posts: 10
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

Joined: Jan 01, 2013
Posts: 10
I have figuered it out.

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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Swing SeaGlass UI L&F, resizing issue
 
Similar Threads
Control the minimum size of a JFrame
product all array elements without the first element
Swing: Unable to bring down the size of JPanel
UI's and Look-And-Feels
Cleared SCJD (UrlyBird 1.3.3) with 381