Hello,
I have a liite problem with my code
I created a window in which I do the following
Code:
pn JPanel = new JPanel ();
pn.setLayout (null);
Then I add in the other two JPanel
Code:
jpne JPanel = new JPanel ();
jpne.setBounds (0,0,200,400);
jpne.add (new Panopticon ());
pn.add (jpne);
jpand JPanel = new JPanel ();
jpand.setBounds (200,0,400,400);
jpand.add (new pngr ());
pn.add (jpand);
pngr () and Panopticon () retrieve the width and height of their JPanel then displayed in the console. They look like:
public class pngr extends JPanel (
public void paintComponent (Graphics g) (
lrg this.getWidth = int ();
hutfen this.getHeight = int ();
System.out.println (lrg + "" + hutfen + "\ n");
Why setBounds settings are they not sent?
Thanks in advance.
Bookmarks