Advertisement
Guest User

GreetingPanel

a guest
Jul 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import javax.swing.*;
  2.  
  3. /**
  4. The GreetingPanel class displays a greeting in a panel.
  5. */
  6.  
  7. public class GreetingPanel extends JPanel
  8. {
  9. private JLabel greeting; // To display a greeting
  10.  
  11.  
  12. ImageIcon image = new ImageIcon("BrandiLogo.jpg");
  13. JLabel label = new JLabel("", image, JLabel.CENTER);
  14.  
  15.  
  16. /**
  17. Constructor
  18. */
  19.  
  20. public GreetingPanel()
  21. {
  22.  
  23.  
  24.  
  25.  
  26. // Create the label.
  27. greeting = new JLabel("Welcome to Brandi's Bagel House");
  28. add(label);
  29.  
  30. // Add the label to this panel.
  31. // add(greeting);
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement