Okey now the problem is that if the previewFrame is set to the default layout the buttons show but since it is using a layout manager the setBounds,setLocation,setSize commands dont work. So I used the code previewFrame.setLoayout(null) which would let me set my own position of the buttons on the JFrame however when I run my program the JFrame is blank and is gray. Anyone know why?
Thanks in advance
static javax.swing.Timer slideTimer4 = new javax.swing.Timer(0100, new ActionListener() {
public void actionPerformed(ActionEvent e) {
previewFrame.setLayout(null);
//restart preview button
restartPreviewBtn.setLocation(10,10);
restartPreviewBtn.setSize(80,80);
restartPreviewBtn.setBackground(blackColor);
restartPreviewBtn.addActionListener(new restartPreviewAction());
finishPanel.add(restartPreviewBtn);
//close previewFrame button
closePreviewFrameBtn.setLocation(150,150);
closePreviewFrameBtn.setSize(80,80);
closePreviewFrameBtn.setBackground(blackColor);
closePreviewFrameBtn.addActionListener(new closePreviewAction());
finishPanel.add(closePreviewFrameBtn);
//finishPanel Properties
finishPanel.setBackground(Color.BLACK);
restartPreviewBtn.setVisible(true);
closePreviewFrameBtn.setVisible(true);
previewFrame.getContentPane().add(finishPanel);
previewFrame.repaint();
previewFrame.validate();
}
});