this is my code, the only problem I'm facing is that the jseperator is not appearing!
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import java.awt.*;
public class AdmForm extends JFrame{
Container con1= getContentPane();
Container con2=getContentPane();
JFrame f2= new JFrame();
JButton b1= new JButton("Click me!");
JSeparator sep= new JSeparator(SwingConstants.HORIZONTAL);
AdmForm(){
setSize(300,300);
setLayout(null);
b1.setBounds(60,60,100,40);
sep.setLocation(60,130);
sep.setPreferredSize(new Dimension(10,1));
add(sep);
con1.add(b1);
f2.setSize(300,300);
f2.setLayout(null);
setVisible(true);
b1.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
f2.setVisible(true);
}});
}
public static void main(String[] args) {
new AdmForm();
System.out.println("Hello World!");
}
}