I’ve been playing with this for some time and I haven’t been able to get my applet to center in the middle of a tabbed pane in my jframe:
JFrame.setDefaultLookAndFeelDecorated(false);
setSize(500,500);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBackground(Color.gray);
JTabbedPane tabbedPane = new JTabbedPane();
JPanel appletpanel = new JPanel(new BorderLayout(),false);
applet=new jsgcApplet();
appletpanel.add(applet,BorderLayout.CENTER);
editor=new JEditorPane();
JScrollPane editorpane = new JScrollPane(editor);
tabbedPane.add("Display",appletpanel);
tabbedPane.add("Script Editor",editorpane);
getContentPane().add(tabbedPane,BorderLayout.CENTER);
applet.init();
applet.start();
setVisible(true);
Does anyone see anything blatantly wrong with my code?
Edit: With this code it is set at the top right corner