• 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
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
Bartenders:
  • Himai Minh
  • Carey Brown
  • Frits Walraven

Draging componets like JButtons during runtime in JFrame

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wanted to add an JFrame with JButton to my application in which user can drag component(JButton) to some extend and then it could open different JFrame
 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Let us know if you get stuck and share your SSCCE code so we can help point you in the right direction.
 
Marshal
Posts: 73334
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dragging buttons? Opening second frames? Both sound very iffy. If you want a secondary display, use a dialogue window, not a frame.
 
Abhishek Abhinav
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sir you aren't getting what i mean to say !!
You have usually seen in cell phone that they provide Lock guard screen where a user have to drag a button to certain extent and then the screen gets unlocked leading to home screen.
Now in my application i wanted to build the same Lock Guard Screen !! when user clicks Lock buttons then a Lock screen JFrame appears where only one buttons is displayed,now user have to drag that button to certain extent to unlock the system and resume working
 
Campbell Ritchie
Marshal
Posts: 73334
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is not a frame, but a dialogue.
You are going round things the wrong way if you are quoting class names at this stage. You should simply say it is a display, and you have to drag across it. Later on, you can decide what class to implement it with.
 
Abhishek Abhinav
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:That is not a frame, but a dialogue.
You are going round things the wrong way if you are quoting class names at this stage. You should simply say it is a display, and you have to drag across it. Later on, you can decide what class to implement it with.



can you please provide me with some example !! because i`m not getting what you are trying to say.
 
Campbell Ritchie
Marshal
Posts: 73334
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this FAQ.
 
reply
    Bookmark Topic Watch Topic
  • New Topic