r/javahelp • • Jun 22 '20

How do I open a jpanel from within a jframe?

Ive tried MyFrame.add(Mypanel); but that doesn’t do anything

0 Upvotes

2 comments sorted by

1

u/[deleted] Jun 23 '20

1

u/overflow_ Jun 23 '20

So this still does nothing it just launches another jframe i have this in jmenuitemactiontriggered method myFrame f = new myFrame(); myPanel p = new myPanel(); f.add(p); p.setVisible(true);