• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Drag and Resize JPanel

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi good guys and girls!
I'm trying to change some features of JPane then i did the following:

mypane.getRootPane (). setWindowDecorationStyle (JRootPane.NONE);

This removed the title bar and the buttons to minimize, resize and close. This is exactly what I want, but I want to also be able to drag and resize mypane. I tried a lot of things and can not get desired result (mypane.setResize (true); etc.).
Any good soul can help me?
Recalling: I do not want the title bar and the buttons minimize, resize and close - but I want to drag and resize it.
Thanks guys and girls!
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there are a number of ways this can be done.

here's one of those ways, but depending on the rest of the program, may not suit.
(at least you'll have something to play around with)

 
Nilton Castro
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good morning Michael Dunn!
Thanks for answering my question quickly, I will try to implement your suggestion as soon as possible and I inform you of the outcome. I know it does not matter but I have a little experience in game creation and commercial applications. In this case I am trying to create a commercial application with a different look. I use animated background and components with a certain level of transparency. All panels are volumetric (like a glass plate). Because of this the traditional title bar and buttons to maximize, resize and close are not allowed, but i do not want the user to lose mobility that would normally have to drag and resize the panels. As a game these decisions occur within the panel and I do not want to mix default and custom.
NOTE:
At first I thought that Java was a beautiful woman from afar and up close, a wild cat.
Then I thought Java was a beautiful woman from afar and up close, most beautiful and hot.
Today I think Java was created by lawyers (but still a beautiful and hot woman who likes spend all our time).
Thank you!
Nilton (a rookie today and forever)
 
Nilton Castro
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good morning Michael Dunn!
I implemented the solution you suggested and it worked perfectly, thanks. Now I will make adjustments to the application to work with different screen resolutions and I'll be ready to start programming for android tablet. And just as was the case with java swing, I know nothing about android, but I'm motivated.
I wrote these lines to thank you and all those who help us anonymously, and for those who say that human beings are selfish, I'll show you guys and gurls.
Nilton
 
He baked a muffin that stole my car! And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic