so im coming up with a program that im wanting to have a button, but it isnt showing with my graphics on the frame and i dont know what to do.
Im trying to pretty much combine these two pictures below and have the button on the bottom.
Here is the code i have for putting these into the frame.
public void showInterface() { //FRAME frame.setSize(700, 800); frame.setTitle("HangMan"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //PULLS IN STARTING GRAPHICS display = new DisplayComponent(); JPanel panel = new JPanel(); //BUTTON NEEDING TO BE IN THE FRAME, SHOWING GRAPHICS button = new JButton("Guess"); AddButtonListener listener = new AddButtonListener(); panel.add(button); frame.add(display); frame.add(panel); button.addActionListener(listener); frame.setVisible(true); }