Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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
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

Swing SeaGlass UI L&F, resizing issue

Lukasz Jarocki

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

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.

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

Joined: Jan 01, 2013
Posts: 15
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:
subject: Swing SeaGlass UI L&F, resizing issue
jQuery in Action, 3rd edition