java - How to show a JFrame after another one closed? -
let's have 2 forms such a.java
, b.java
. there button inside a.java
creates b
object,hides , opens b.java
. want show a.java
again after close b.java
. give me simple example situation?
edit: let me give example situation. have chart this:
when click 1 of values, new piechart
pops up, gives detailed information value. can numbers of values opening new jframes. so, think jtabbedpane
can't solve problem.
this perfect situation cardlayout
, panels "layered" , can navigate through them using methods show()
, previous()
, next()
see more @ how use cardlayout
you can see simple example here , if happen using netbeans gui builder can see how use cardlayout
diesign view here
also see the use of multiple jframes, good/bad practice?. popular answer no. cardlayout
seems fit bill situation.
Comments
Post a Comment