I'm developing an app for computer, and i have a JFrame with a lot of JPanel on it, and when i click on a button, i want another JPanel to popup.
Example: When i click on this button http://i62.tinypic.com/c2fzr.jpg
I want this window to popup http://i62.tinypic.com/2qi0in7.jpg
I already tried making a popup menu, but i don't want a menu, i want a window, and i can't seen to find out how to do it :( It's probably easy, but i don't have enough knowledge in java
Any help? thanks guys!
that is not just a panel you want to pop up that would be considered a whole other frame. I would suggest making a different JFrame class that when the button is clicked instantiates the other frame.
Ok so,for this you will need 2 JFrames. First one is where the buttons and everything is and the second one is the one that will popup. You will have 3 classes:
Main
,classWhere1stJframeis
,ClassWhere2ndJframeis
.This is
main
:This is
Frame1
:This is
Frame2
: