I have a main class that will create a tabbed interface. each tab will call a class that has been imported from a seperate file, the trouble is with the imported class it will create some text boxes and labels to put on the screen.
Using a JPanel as the base with border layout and a details panel which will hold the text boxes. add details with null layout to main panel and then disply it with this.add(....). this does not work and does not display anything, I can get it to display all the textboxes in one long line but not as set out in setbounds.
Is there anyway to transport the panel back to the main class to display.
ie. import class
public class Import extends JPanel{
public Import(){
qpanel();
}
protected Component qpanel(){
set text boxes up
return qpanel
}
}
main class has this statement
Component panel1 = new QuoteSystem()
and...
tabbedPane.addTab("Quotes", icon, panel1, ""
Can anyone help... a more detailed class files can be put on if needed or any other questions I will try and answer.
Thanks
Using a JPanel as the base with border layout and a details panel which will hold the text boxes. add details with null layout to main panel and then disply it with this.add(....). this does not work and does not display anything, I can get it to display all the textboxes in one long line but not as set out in setbounds.
Is there anyway to transport the panel back to the main class to display.
ie. import class
public class Import extends JPanel{
public Import(){
qpanel();
}
protected Component qpanel(){
set text boxes up
return qpanel
}
}
main class has this statement
Component panel1 = new QuoteSystem()
and...
tabbedPane.addTab("Quotes", icon, panel1, ""
Can anyone help... a more detailed class files can be put on if needed or any other questions I will try and answer.
Thanks