customizing JFrame decorations

Hu :slight_smile:

I need (well not really ;D) to customize the title bar of a frame. I know that there are at least two ways to do it, but both appear somewhat long winded and way too complicated… after all it isn’t that unusual is it?

#1 setUndecorated(true) and do everything yourself… minimize, maximize, dragging… uh :stuck_out_tongue:

#2 writing a mini L&F… mh :-/

So… is there an easier way? I’ve reinvented the wheel far too often.

I was surprised to find out quite how easy doing #2 actually is.

Kev

Did that once for scrollbars and I was quite surprised how much stuff I had to write for doing that :stuck_out_tongue:

As far as I can tell I would have to do my own RootPaneUI and TitlePane. Gonna try that :wink:

I second kevglass, writing L&F is not that difficult.

You can also live with swing and change only basic elements like color, images and borders to obtain a radically different L&F.

I actually decided against doing my own LAF thingy.

#1 was just less code/less bloat and it doesn’t smear/flicker like a usual JFrame while dragging for some weird reason.

I’ll eventually post the code here after refactoring/cleanup.

I don´t know if it´s exactly what u were looking for…anyway I think this link is worth to see:

http://www-106.ibm.com/developerworks/java/library/j-iframe/?ca=dgr-jw17j-iframe

Yea, that ibm stuff is pretty cool.

However, there is still smearing/flickering… therefore I’ll stay with my own solution.