Biblioteca Java - Blame information for rev 28

Subversion Repositories:
Rev:
Rev Author Line No. Line
28 mihai 1 package exemple.fire.thread;
2  
3 import javax.swing.JLabel;
4 import javax.swing.JTextField;
5 import javax.swing.WindowConstants;
6  
7  
8 /**
9 * This code was generated using CloudGarden's Jigloo
10 * SWT/Swing GUI Builder, which is free for non-commercial
11 * use. If Jigloo is being used commercially (ie, by a corporation,
12 * company or business for any purpose whatever) then you
13 * should purchase a license for each developer using Jigloo.
14 * Please visit www.cloudgarden.com for details.
15 * Use of Jigloo implies acceptance of these licensing terms.
16 * *************************************
17 * A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED
18 * for this machine, so Jigloo or this code cannot be used legally
19 * for any corporate or commercial purpose.
20 * *************************************
21 */
22 import javax.swing.JPanel;
23 import java.awt.GridLayout;
24 import java.awt.BorderLayout;
25 public class ThreadJFrame extends javax.swing.JFrame {
26         private JPanel panel;
27  
28         public ThreadJFrame() {
29                 super();
30                 initGUI();
31         }
32  
33         public void addThreadCounterTextbox(NumaratorWindowT t){
34             String name = t.getName();
35             JLabel l = new JLabel(name);
36             JTextField tf = new JTextField();
37             panel.add(l);
38             panel.add(tf);
39  
40             t.setTextField(tf);
41         }
42  
43         private void initGUI() {
44                 try {
45                         setSize(400, 300);
46                         setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
47             {
48                 panel = new JPanel();
49                 GridLayout jPanel1Layout = new GridLayout(30, 2);
50                 jPanel1Layout.setColumns(2);
51                 jPanel1Layout.setRows(30);
52                 this.getContentPane().add(panel, BorderLayout.CENTER);
53                 panel.setLayout(jPanel1Layout);
54             }
55                 } catch (Exception e) {
56                         e.printStackTrace();
57                 }
58         }
59  
60         /**
61         * Auto-generated method for setting the popup menu for a component
62         */
63     private void setComponentPopupMenu(
64         final java.awt.Component parent,
65         final javax.swing.JPopupMenu menu) {
66         parent.addMouseListener(new java.awt.event.MouseAdapter() {
67             public void mousePressed(java.awt.event.MouseEvent e) {
68                 if (e.isPopupTrigger())
69                     menu.show(parent, e.getX(), e.getY());
70             }
71             public void mouseReleased(java.awt.event.MouseEvent e) {
72                 if (e.isPopupTrigger())
73                     menu.show(parent, e.getX(), e.getY());
74             }
75         });
76     }
77  
78 }