Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- /**
- The GreetingPanel class displays a greeting in a panel.
- */
- public class GreetingPanel extends JPanel
- {
- private JLabel greeting; // To display a greeting
- ImageIcon image = new ImageIcon("BrandiLogo.jpg");
- JLabel label = new JLabel("", image, JLabel.CENTER);
- /**
- Constructor
- */
- public GreetingPanel()
- {
- // Create the label.
- greeting = new JLabel("Welcome to Brandi's Bagel House");
- add(label);
- // Add the label to this panel.
- // add(greeting);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement