Load cups into easysw/current.
[thirdparty/cups.git] / scripting / java / example / GLP.java
1
2 import java.awt.*;
3 import java.awt.event.*;
4 import javax.swing.*;
5 import java.net.URL;
6 import java.net.*;
7 import java.io.*;
8 import com.easysw.cups.*;
9
10 public class GLP implements ActionListener 
11 {
12     private JTabbedPane mainPanel      = null;
13
14     // Constructor
15     public GLP() 
16     {
17       GLPvars.init();
18
19       GLPvars.mainGLPPanel = new JTabbedPane();
20       GLPvars.tabs         = new GLPtabs();
21       GLPvars.mainGLPPanel = GLPvars.tabs.getPanel(); 
22     }
23
24     // Implementation of ActionListener interface.
25     public void actionPerformed(ActionEvent event) 
26     {
27       // if ("comboBoxChanged".equals(event.getActionCommand())) 
28       // {
29             // update the icon to display the new phase
30             // phaseIconLabel.setIcon(images[phaseChoices.getSelectedIndex()]);
31       // }
32     }
33
34     // main method
35     public static void main(String[] args) 
36     {
37         // create a new instance of CupsApplet
38         GLP app = new GLP();
39
40         // Create a frame and container for the panels.
41         JFrame glpFrame = new JFrame("Java GLP");
42
43         // Set the look and feel.
44         try {
45             UIManager.setLookAndFeel(
46                 UIManager.getCrossPlatformLookAndFeelClassName());
47         } catch(Exception e) {}
48         
49         glpFrame.setContentPane(GLPvars.mainGLPPanel);
50
51         // Exit when the window is closed.
52         glpFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
53         glpFrame.setSize(600,400);
54         
55         // Show the converter.
56         // glpFrame.pack();
57         glpFrame.setVisible(true);
58     }
59 }