Re: extended JPanel is empty
I should also point out that im trying to call it in an applet. I called it in a normal JFrame and it worked fine, it just doesnt like the applet...
Re: extended JPanel is empty
You do not have a constructor for your FindPanel Class. You need an overide constructor
Re: extended JPanel is empty
How do i make an override constructor? What is it exactly?
Re: extended JPanel is empty
JPanel is your superclass, in this case, so you need to insert the code...
Code :
super(String title)
//title is what the dialog box will be named in its title bar
...before your other code.
You also need to surround everything you have so far except the class name in...
Code :
public FindPanel() {
//your other code here
}
So, when it's all put together, the end result should be something like this:
Code :
public class FindPanel extends JPanel
{
public FindPanel()
{
super(String title)
//Note that you will not actually type "String title"; instead you
//should type what you want the dialog to be titled when you open it
//Put all your other code here, like the JRadioButton and ButtonGroup, etc.
//Don't include the "public void classesJPanel()" part, just remove those brackets
//The "super" constructor already creates a JPanel, and you're just customizing it
}
}
Hopefully I got my meaning through... Sorry if it's unclear.