Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3756 > unrolled thread

render fake titlebar with

Started by"Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this>
First post2011-04-27 15:46 +0000
Last post2011-04-27 15:46 +0000
Articles 3 — 2 participants

Back to article view | Back to comp.lang.java.gui


Contents

  render fake titlebar with "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:46 +0000
    Re: render fake titlebar "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:46 +0000
      Re: render fake titlebar "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:46 +0000

#3756 — render fake titlebar with

From"Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this>
Date2011-04-27 15:46 +0000
Subjectrender fake titlebar with
Message-ID<48721c94$1@news.uni-rostock.de>
  To: comp.lang.java.gui
Hi there,

I'd like to draw a fake titlebar in my swing gui. But the title bar 
should look like a real title bar using the current selected look and feel.
Any ideas on how to achieve that?

Thanks in advance
Stefan Rybacki

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#3757 — Re: render fake titlebar

From"Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this>
Date2011-04-27 15:46 +0000
SubjectRe: render fake titlebar
Message-ID<48724c5d$0$13555$7836cce5@newsrazor.net>
In reply to#3756
  To: comp.lang.java.gui
Stefan Rybacki wrote:
> Hi there,
> 
> I'd like to draw a fake titlebar in my swing gui. But the title bar 
> should look like a real title bar using the current selected look and feel.
> Any ideas on how to achieve that?
> 
> Thanks in advance
> Stefan Rybacki
The real question is, why do you need a fake title bar? Could you use a 
JDesktopPane and JInternalFrame instead?

As I understand it, the platform look and feel actually uses native 
components/decorations directly, so there isn't necessarily a way to 
draw "fake" window decoration on something that isn't a platform window. 
   I could be wrong about that though.

-- 
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3758 — Re: render fake titlebar

From"Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this>
Date2011-04-27 15:46 +0000
SubjectRe: render fake titlebar
Message-ID<4872517b$1@news.uni-rostock.de>
In reply to#3757
  To: comp.lang.java.gui
Daniel Pitts schrieb:
> Stefan Rybacki wrote:
>> Hi there,
>>
>> I'd like to draw a fake titlebar in my swing gui. But the title bar 
>> should look like a real title bar using the current selected look and 
>> feel.
>> Any ideas on how to achieve that?
>>
>> Thanks in advance
>> Stefan Rybacki
> The real question is, why do you need a fake title bar? Could you use a 
> JDesktopPane and JInternalFrame instead?
> 
The answer is I might wanna seperate my panel into regions and like the 
window metaphor where there aren't actual windows.
I could use JDesktopPane and JInternalFrame though but was interested 
whether it is possible to fake a title bar using the current look and feel.
I got it working for the Metal look using the proper titlebar ui classes 
provided in the look and feel.
But I was wondering whether there is a more general way to do this.

> As I understand it, the platform look and feel actually uses native 
> components/decorations directly, so there isn't necessarily a way to 
> draw "fake" window decoration on something that isn't a platform window. 
>   I could be wrong about that though.
> 
Well, I didn't think about the native look and feel which could indeed 
be tricky but which could be adressed using the look and feel methods to 
determine whether the look and feel supports decorating windows or not, 
I could use an alternative implementation of a titlebar in that case.

And again, thanks for your help it is appreciated.

Stefan Rybacki

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web