I am wanting to add a panel to the right of the JFrame, but it isn't showing up when I do this:
getFrame().getContentPane().add(new Hiscores(), "West");
What am I doing wrong? Hiscores is a class that extend JPanel by the way.
private static void loadClient() throws Exception { System.out.println("Loading client..."); RS2Loader loader = new RS2Loader(); Applet a = null; try { a = (Applet) loader.loadClass("client").newInstance(); a.setPreferredSize(new Dimension(765, 503)); a.setStub(loader); a.init(); a.start(); } catch (Exception e) { JOptionPane.showMessageDialog( null, "Error loading client - delete gamepack.jar in: " + System.getProperty("user.home") + ".jagex_cache_32 and reload this applet."); e.printStackTrace(); } final JTabbedPane pane = new JTabbedPane(JTabbedPane.TOP); JComponent panelComponent = new JPanel(false); panelComponent.setLayout(new GridLayout()); panelComponent.add(a); pane.setOpaque(true); pane.setForeground(new Color(64, 58, 58, 150)); JComponent panel1 = new JPanel(false); panel1.setLayout(new GridLayout()); panel1.add(new Calculator()); JComponent panel2 = new JPanel(false); panel2.setLayout(new GridLayout()); panel2.add(new Hiscores()); pane.addTab("Client", panelComponent); pane.addTab("Combat Calc.", panel1); pane.addTab("Hiscores", panel2); pane.setFont(font); getFrame().setIconImage( new ImageIcon(Hiscores.class.getClassLoader().getResource( "skill_icon/icon.png")).getImage()); getFrame().setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); getFrame().getContentPane().add(new Hiscores(), "West"); getFrame().setContentPane(pane); getFrame().setResizable(false); getFrame().pack(); getFrame().setVisible(true); Executors.newScheduledThreadPool(1).scheduleWithFixedDelay(new Runnable() { @Override public void run() { long milliseconds = System.currentTimeMillis() - START_TIME; String time = (int) ((milliseconds / (1000*60*60*24)) % 7) + ":" + ((int) ((milliseconds / (1000 * 60 * 60)) % 24)) + ":" + ((int) ((milliseconds / (1000 * 60)) % 60)) + ":" + ((int) (milliseconds / 1000) % 60); getFrame().setTitle("RuneScape 07 (" + time + ")"); } }, 1, 1, TimeUnit.SECONDS); }