Only 49 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JPanel that needs to show another "window" when I click a component  RSS feed

 
Andres Del Pino
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i´m trying to do something in my application but don´t know how to do it, so i´m going to explain it what i want to do and hope you can assist me.
Sorry for the subject, i didn´t even know how to put this simple so you know what i´m talking about reading the subject.

I have a JPanel and there I paint some components, they are only rectangles that shows some information about the components, the thing is that I want to be able to change the component information by clicking the rectangle.
My idea was to show a window (another JPanel or something) over that JPanel that shows the entire information about the component and allow to edit it, but i don´t know how to do this.

I would appreciate any idea about doing this.
Thanks for your help.
 
Rob Spoor
Sheriff
Posts: 20892
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want a model JDialog.
 
Andres Del Pino
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, thank you for your reply, I was surfing the net more and more and I got to the same conclusion, using a MouseHandler in the JPanel and when someone click a component launch a model JDialog.

I´ll write the result as soon as I finish it.
 
Campbell Ritchie
Sheriff
Posts: 53720
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:You want a model JDialog.
Are you sure about the spelling? Model or Modal?
 
Andres Del Pino
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:
Rob Prime wrote:You want a model JDialog.
Are you sure about the spelling? Model or Modal?


You are right, modal.
 
Rob Spoor
Sheriff
Posts: 20892
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:
Rob Prime wrote:You want a model JDialog.
Are you sure about the spelling? Model or Modal?

Model of course:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!