final JLabel lblEw = new JLabel("");
lblEw.setFont(new Font("Year supply of fairy cakes", Font.BOLD | Font.ITALIC, 15));
lblEw.setBounds(382, 492, 174, 70);
contentPane.add(lblEw);
lblEw.setVisible(true);
final JLabel lblTechunterlagen = new JLabel("");
lblTechunterlagen.setFont(new Font("Year supply of fairy cakes", Font.BOLD | Font.ITALIC, 15));
lblTechunterlagen.setBounds(559, 492, 249, 70);
contentPane.add(lblTechunterlagen);
lblTechunterlagen.setVisible(true);
final JButton btnOok = new JButton("OOK");
btnOok.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
lblEw.setText("Ook");
}
});
final JButton btnPlan = new JButton("Plan");
btnPlan.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
lblTechunterlagen.setText("Plan");
}
});
final JLabel label = new JLabel("");
label.setIcon(new ImageIcon(getClass().getResource("/GraphischeDarstellung/OOK1.jpg")));
label.setBounds(10, 81, 791, 409);
contentPane.add(label);
label.setVisible(false);
if (lblEw.getText().equals("Ook")
& lblTechunterlagen.getText().equals("Plan"))
label.setVisible(true);