a panel can't appear!
I have three java files scanAndCorrect.java, panel.java, Senior.java.
[code:]
in scanAndCorrect.java
public scanAndCorrect(JPanel pane);
// in panel.java:
scanAndCorrect scanandCorrect = new scanAndCorrect(panel);
// in Senior.java
panel s_pane = new panel();
[/code]
my problem is that the panel cannot be viewed in the Senior.java, what might be the problem?
Errrrr..... While I'm not quite sure what all that means, I have run into problems displaying Panels numerous times. First try resizing it. If you're using JFrame, then resize the content pane. I don't know if that's been delt with in JDK 1.5, but I know it was a serious problem of mine with JDK 1.4. It always starts at size 0x0 as near as I can tell. Hope that helps.
thank you Legend Keeper for your time
I found the solution after few hours of bad time, it appeared that calling the panel.java app, leads to creating the panel in a new window. and I found out that the following code should be writing in the senior.java file:
[code:]
panel s_pane = new panel();
JPanel panels;
panels = s_pane.panel;
setContentPane(panels);
setVisible(true);
[/code]