]> git.ipfire.org Git - thirdparty/cups.git/blame - scripting/java/example/GLP.java
Load cups into easysw/current.
[thirdparty/cups.git] / scripting / java / example / GLP.java
CommitLineData
ef416fc2 1
2import java.awt.*;
3import java.awt.event.*;
4import javax.swing.*;
5import java.net.URL;
6import java.net.*;
7import java.io.*;
8import com.easysw.cups.*;
9
10public 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}