Advertisement
DigiDuncan

Debug Problems

May 29th, 2015
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.80 KB | None | 0 0
  1. import javax.swing.*;
  2.  
  3. import BreezySwing.*;
  4.  
  5. @SuppressWarnings({ "unused", "serial", "restriction"}) //Shut up, Eclipse.
  6. public class GlucavaGUI extends GBFrame
  7. {
  8.     //Instantiate the backbone.
  9.     public GlucavaBackbone backbone = new GlucavaBackbone();
  10.    
  11.     //Make GUI objects.
  12.     private JLabel          titleLabel;
  13.     private JLabel          sugarLabel;
  14.     private IntegerField    sugarField;
  15.     private JLabel          timeLabel;
  16.     private IntegerField    timeField;
  17.     private JLabel          seperator;
  18.     private JLabel          foodLabel;
  19.     private JTextField      foodField;
  20.     private JButton         addFoodButton;
  21.     private JLabel          currentFoodLabel;
  22.     private JTextArea       currentFoodArea;
  23.     private JButton         calculateButton;
  24.    
  25.     //Constructor
  26.     public GlucavaGUI ()
  27.     {
  28.         //GUI Positioning
  29.         titleLabel          =   addLabel        ("Welcome to Glucava", 1, 1, 5, 1);
  30.         sugarLabel          =   addLabel        ("Current Sugar", 2, 1, 2, 1);
  31.         sugarField          =   addIntegerField (150, 2, 4, 2, 1);
  32.         timeLabel           =   addLabel        ("Time (24h)", 3, 1, 2, 1);
  33.         timeField           =   addIntegerField (0000, 3, 4, 2, 1);
  34.         seperator           =   addLabel        ("", 4, 3, 5, 1);
  35.         foodLabel           =   addLabel        ("Food", 5, 2, 1, 1);
  36.         foodField           =   addTextField    ("", 6, 1, 5, 1);
  37.         addFoodButton       =   addButton       ("Add", 5, 4, 1, 1);
  38.         currentFoodLabel    =   addLabel        ("Current foods added:", 7, 1, 1, 1);
  39.         currentFoodArea     =   addTextArea     ("", 8, 1, 5, 3);
  40.         calculateButton     =   addButton       ("Calculate", 11, 1, 1, 1);
  41.        
  42.        
  43.     }
  44.     public void buttonClicked (JButton buttonObj)
  45.     {
  46.        
  47.         if (buttonObj == addFoodButton)
  48.         {
  49.             //TODO Add food stuff.
  50.         }
  51.         else
  52.         {
  53.             //TODO Add calculate stuff.
  54.         }
  55.     }
  56.     public static void main (String [] args)
  57.     {
  58.         GlucavaGUI theGUI = new GlucavaGUI();
  59.         theGUI.setSize (330, 625);
  60.         theGUI.setVisible (true);
  61.         debug();
  62.     }
  63.     private static void debug()
  64.     {
  65.         System.out.print(waffle);
  66.     }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement