This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi,
I have a JFrame that I would like to set Opaque when the MouseButton is held down on the TitleBar and moved and returns to solid when released. I have two problems.
(1) The only way I could get the Opacity to work was by setting: JFrame.setDefaultLookAndFeelDecorated(true); This works but changes the Titlebar to a really ugly non-Windows look and feel Titlebar. Would like it to work without changing the Windws look and feel.
(2) Second problem is that when I click on the Titlebar, I cannot move the JFrame.
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
> I have a JFrame that I would like to set Opaque when the MouseButton is held down on the TitleBar and moved and returns to solid when released.
you might get it to work by adding a ComponentListener's componentMoved() to the frame,
but this will fire multiple times during the 'move'.
the trick will be to determine when the move has finished, i.e. returning to 'solid'.
maybe a Timer, repeats(false) each firing, to check if current x,y = old x,y (???)
luck, db
There are no new questions, but there may be new answers.
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
Thanks Darryl, another time-waster added to my ignore list.
Tim Alvord
Greenhorn
Joined: Jan 24, 2013
Posts: 22
posted
0
Darryl, Michael...
Sorry about the Cross Posting. Didn't realize that it was frowned upon in the Java arena. I come from the .Net world where is is not only allowed but encouraged...