Alright so basically I have a logo named "DirSync.jp g" and I want to display it on the top portion of my application window in a container (either JLabel or JPanel which ever is normally recommended)
I want the getTitlePanel to return me a panel with my image as the background could someone add what I need to do here I've searched around and can't find anything of use... thanks.
Code:
public class MainFrame extends JFrame { public MainFrame() { super(); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setSize(500,500); this.add(getMainPanel()); this.setVisible(true); } private JPanel getMainPanel() { JPanel panel = new JPanel(); panel.setBackground(getLuckyPointColor()); panel.setLayout(new FlowLayout()); panel.add(getTitlePanel()); return panel; } }
Comment