Example usage for javax.swing.tree DefaultMutableTreeNode add

List of usage examples for javax.swing.tree DefaultMutableTreeNode add

Introduction

In this page you can find the example usage for javax.swing.tree DefaultMutableTreeNode add.

Prototype

public void add(MutableTreeNode newChild) 

Source Link

Document

Removes newChild from its parent and makes it a child of this node by adding it to the end of this node's child array.

Usage

From source file:com.pironet.tda.SunJDKParser.java

private void addHistogramToDump(DefaultMutableTreeNode threadDump, HistogramTableModel classHistogram) {
    final HistogramInfo hi = new HistogramInfo("Class Histogram of Dump", classHistogram);
    final DefaultMutableTreeNode catHistogram = new DefaultMutableTreeNode(hi);
    threadDump.add(catHistogram);
}

From source file:com.pironet.tda.SunJDKParser.java

private int fillBlockingThreadMaps(final MonitorMap mmap,
        final Map<String, DefaultMutableTreeNode> directChildMap) {
    int blockedThread = 0;
    for (Iterator iter = mmap.iterOfKeys(); iter.hasNext();) {
        String monitor = (String) iter.next();
        Map<String, String>[] threads = mmap.getFromMonitorMap(monitor);

        // Only one thread can really be holding this monitor, so find the thread
        String threadLine = getLockingThread(threads);
        ThreadInfo tmi = new ThreadInfo("Thread - " + threadLine, null, "", 0, null);
        DefaultMutableTreeNode threadNode = new DefaultMutableTreeNode(tmi);

        ThreadInfo mmi = new ThreadInfo("Monitor - " + monitor, null, "", 0, null);
        DefaultMutableTreeNode monitorNode = new DefaultMutableTreeNode(mmi);
        threadNode.add(monitorNode);

        // Look over all threads blocked on this monitor
        for (final Object o : threads[MonitorMap.WAIT_THREAD_POS].keySet()) {
            String thread = (String) o;
            // Skip the thread that has this monitor locked
            if (!threads[MonitorMap.LOCK_THREAD_POS].containsKey(thread)) {
                blockedThread++;/*from   w  w w .  j  a va 2s  .  co  m*/
                createNode(monitorNode, "Thread - " + thread, null,
                        threads[MonitorMap.WAIT_THREAD_POS].get(thread), 0);
            }
        }

        final String blockingStackFrame = threads[MonitorMap.LOCK_THREAD_POS].get(threadLine);
        tmi.setContent(blockingStackFrame);
        mmi.setContent("This monitor (" + linkifyMonitor(monitor)
                + ") is held in the following stack frame:\n\n" + blockingStackFrame);

        // If no-one is blocked on or waiting for this monitor, don't show it
        if (monitorNode.getChildCount() > 0) {
            directChildMap.put(monitor, threadNode);
        }
    }
    return blockedThread;
}

From source file:edu.ucla.stat.SOCR.chart.ChartTree.java

private MutableTreeNode createCrosshairChartsNode() {
    DefaultMutableTreeNode root = new DefaultMutableTreeNode("Crosshairs");

    DefaultMutableTreeNode n1 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.CrosshairDemo1", "CrosshairDemo1"));
    DefaultMutableTreeNode n2 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.CrosshairDemo2", "CrosshairDemo2"));
    DefaultMutableTreeNode n3 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.CrosshairDemo3", "CrosshairDemo3"));
    DefaultMutableTreeNode n4 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.CrosshairDemo4", "CrosshairDemo4"));

    root.add(n1);
    //        root.add(n2);
    root.add(n3);/*from   ww  w  . j  a  v  a 2 s.  c o m*/
    root.add(n4);

    return root;
}

From source file:edu.ucla.stat.SOCR.chart.ChartTree.java

private MutableTreeNode createMarkersNode() {
    DefaultMutableTreeNode root = new DefaultMutableTreeNode("Markers");
    DefaultMutableTreeNode n1 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.CategoryMarkerDemo1", "CategoryMarkerDemo1"));
    DefaultMutableTreeNode n2 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.CategoryMarkerDemo2", "CategoryMarkerDemo2"));
    DefaultMutableTreeNode n3 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.MarkerDemo1", "MarkerDemo1"));
    DefaultMutableTreeNode n4 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.MarkerDemo2", "MarkerDemo2"));
    root.add(n1);
    root.add(n2);//from www .j  a v a 2s.  c o m
    root.add(n3);
    root.add(n4);
    return root;
}

From source file:edu.ucla.stat.SOCR.chart.ChartTree.java

private MutableTreeNode createXYBarChartsNode() {
    DefaultMutableTreeNode root = new DefaultMutableTreeNode("XYPlot");

    DefaultMutableTreeNode n1 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.XYBarChartDemo1", "XYBarChartDemo1"));
    DefaultMutableTreeNode n2 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.XYBarChartDemo2", "XYBarChartDemo2"));
    DefaultMutableTreeNode n3 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.XYBarChartDemo3", "XYBarChartDemo3"));
    DefaultMutableTreeNode n4 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.XYBarChartDemo4", "XYBarChartDemo4"));

    root.add(n1);
    root.add(n2);//from w w  w  . j  a v  a2 s.c  o m
    // root.add(n3);
    // root.add(n4);

    return root;
}

From source file:de.erdesignerng.visual.common.OutlineComponent.java

private void updateCustomTypeTreeNode(Model aModel, CustomType aCustomType,
        DefaultMutableTreeNode aCustomTypeNode) {

    aCustomTypeNode.removeAllChildren();

    //display only details of ENUMERATION and COMPOSITE CustomTypes
    if ((aCustomType.getType() == CustomTypeType.ENUMERATION)
            || (aCustomType.getType() == CustomTypeType.COMPOSITE)) {
        aCustomType.getAttributes().stream().filter(theAttribute -> isVisible(theAttribute))
                .forEach(theAttribute -> {
                    DefaultMutableTreeNode theAttributeNode = new DefaultMutableTreeNode(theAttribute);

                    aCustomTypeNode.add(theAttributeNode);

                    registerUserObject(theAttribute, theAttributeNode);
                });//from w  w  w  .  j a  v a2 s  .com
    } else {
        //TODO: handle EXTERNAL CustomTypes here
    }
}

From source file:edu.ucla.stat.SOCR.chart.ChartTree.java

/**
 * Creates a node for the tree model that contains "meter" charts.
 * //w ww  .  j  a  va  2 s  .  c  o m
 * @return The tree node.
 */
private MutableTreeNode createMeterChartsNode() {
    DefaultMutableTreeNode root = new DefaultMutableTreeNode("Meter Charts");

    DefaultMutableTreeNode n1 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.MeterChartDemo1", "MeterChartDemo1"));

    DefaultMutableTreeNode n2 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.MeterChartDemo2", "MeterChartDemo2"));

    DefaultMutableTreeNode n3 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.MeterChartDemo4", "MeterChartDemo4"));

    DefaultMutableTreeNode n4 = new DefaultMutableTreeNode(
            new DemoDescription("edu.ucla.stat.SOCR.chart.demo.ThermometerDemo1", "ThermometerDemo1"));

    root.add(n1);
    root.add(n2);
    root.add(n3);
    root.add(n4);
    return root;
}

From source file:org.jfree.chart.demo.SuperDemo.java

private MutableTreeNode createGanttChartsNode() {
    DefaultMutableTreeNode defaultmutabletreenode = new DefaultMutableTreeNode("Gantt Charts");
    DefaultMutableTreeNode defaultmutabletreenode1 = new DefaultMutableTreeNode(
            new DemoDescription("GanttDemo1", "GanttDemo1.java"));
    DefaultMutableTreeNode defaultmutabletreenode2 = new DefaultMutableTreeNode(
            new DemoDescription("GanttDemo2", "GanttDemo2.java"));
    defaultmutabletreenode.add(defaultmutabletreenode1);
    defaultmutabletreenode.add(defaultmutabletreenode2);
    return defaultmutabletreenode;
}

From source file:org.jfree.chart.demo.SuperDemo.java

private MutableTreeNode createOrientationNode() {
    DefaultMutableTreeNode defaultmutabletreenode = new DefaultMutableTreeNode("Plot Orientation");
    DefaultMutableTreeNode defaultmutabletreenode1 = new DefaultMutableTreeNode(
            new DemoDescription("PlotOrientationDemo1", "PlotOrientationDemo1.java"));
    DefaultMutableTreeNode defaultmutabletreenode2 = new DefaultMutableTreeNode(
            new DemoDescription("PlotOrientationDemo2", "PlotOrientationDemo2.java"));
    defaultmutabletreenode.add(defaultmutabletreenode1);
    defaultmutabletreenode.add(defaultmutabletreenode2);
    return defaultmutabletreenode;
}

From source file:net.linra.AttendanceSystemFrame.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.//w  w w  . j a  va2  s  . com
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jPanel3 = new javax.swing.JPanel();
    jPanel1 = new javax.swing.JPanel();
    student1 = new javax.swing.JLabel();
    student2 = new javax.swing.JLabel();
    student3 = new javax.swing.JLabel();
    student4 = new javax.swing.JLabel();
    student10 = new javax.swing.JLabel();
    student9 = new javax.swing.JLabel();
    student8 = new javax.swing.JLabel();
    student7 = new javax.swing.JLabel();
    student6 = new javax.swing.JLabel();
    student11 = new javax.swing.JLabel();
    student12 = new javax.swing.JLabel();
    student13 = new javax.swing.JLabel();
    student14 = new javax.swing.JLabel();
    student15 = new javax.swing.JLabel();
    student20 = new javax.swing.JLabel();
    student19 = new javax.swing.JLabel();
    student18 = new javax.swing.JLabel();
    student17 = new javax.swing.JLabel();
    student16 = new javax.swing.JLabel();
    student21 = new javax.swing.JLabel();
    student22 = new javax.swing.JLabel();
    student23 = new javax.swing.JLabel();
    student24 = new javax.swing.JLabel();
    student25 = new javax.swing.JLabel();
    student5 = new javax.swing.JLabel();
    jPanel2 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    absentNumber = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jScrollPane2 = new javax.swing.JScrollPane();
    jList1 = new javax.swing.JList<>();
    jPanel4 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jPanel8 = new javax.swing.JPanel();
    studentCombobox = new javax.swing.JComboBox<>();
    jButton2 = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTree1 = new javax.swing.JTree();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jMenuItem1 = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    jMenuItem2 = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Smart Attendence Systen");
    setBackground(new java.awt.Color(102, 102, 102));

    jPanel3.setBackground(new java.awt.Color(255, 255, 255));
    jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    jPanel1.setBorder(
            javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(),
                    "Student", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
                    javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

    student1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student1.setText("student1");

    student2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student2.setText("student2");

    student3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student3.setText("student3");

    student4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student4.setText("student4");

    student10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student10.setText("student10");

    student9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student9.setText("student9");

    student8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student8.setText("student8");

    student7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student7.setText("student7");

    student6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student6.setText("student6");

    student11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student11.setText("student11");

    student12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student12.setText("student12");

    student13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student13.setText("student13");

    student14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student14.setText("student14");

    student15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student15.setText("student15");

    student20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student20.setText("student20");

    student19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student19.setText("student19");

    student18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student18.setText("student18");

    student17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student17.setText("student17");

    student16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student16.setText("student16");

    student21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student21.setText("student21");

    student22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student22.setText("student22");

    student23.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student23.setText("student23");

    student24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student24.setText("student24");

    student25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student25.setText("student25");

    student5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    student5.setText("student5");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(student1).addComponent(student2).addComponent(student3)
                            .addComponent(student4).addComponent(student5))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup().addGap(34, 34, 34)
                                    .addGroup(jPanel1Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(student7).addComponent(student6)
                                            .addComponent(student8).addComponent(student9))
                                    .addGap(26, 26, 26))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    jPanel1Layout.createSequentialGroup()
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(student10).addGap(18, 18, 18)))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(student12).addComponent(student11).addComponent(student13)
                            .addComponent(student14).addComponent(student15))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(student17).addComponent(student16).addComponent(student18)
                            .addComponent(student19).addComponent(student20))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(student22).addComponent(student23).addComponent(student21)
                            .addComponent(student24).addComponent(student25))
                    .addGap(229, 229, 229)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(student1)
                                    .addGap(12, 12, 12).addComponent(student2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(student3)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(student4))
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(student11)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(student12).addGap(78, 78, 78)
                                    .addGroup(jPanel1Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(student14).addComponent(student19)
                                            .addComponent(student24)))
                            .addGroup(jPanel1Layout.createSequentialGroup().addComponent(student21)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(student22)))
                            .addGap(12, 12, 12)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(student15).addComponent(student10).addComponent(student5)))
                    .addGroup(jPanel1Layout.createSequentialGroup().addComponent(student6)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(student7)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(student8).addComponent(student13).addComponent(student18)
                                    .addComponent(student23))
                            .addGap(18, 18, 18).addComponent(student9))
                    .addGroup(jPanel1Layout.createSequentialGroup().addComponent(student16)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(student17).addGap(138, 138, 138)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(student20).addComponent(student25))))
                    .addContainerGap(11, Short.MAX_VALUE)));

    jPanel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

    jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/linra/picpackage/student.png"))); // NOI18N
    jLabel1.setText("Absent student:");

    absentNumber.setText("25");

    jLabel3.setText("Student who are absent:");

    jList1.setModel(new javax.swing.DefaultListModel());
    jScrollPane2.setViewportView(jList1);

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jPanel2Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 272, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                            .addGroup(jPanel2Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel2Layout.createSequentialGroup().addComponent(jLabel1)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(absentNumber))
                                    .addComponent(jLabel3))
                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addGap(16, 16, 16)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1).addComponent(absentNumber))
                    .addGap(12, 12, 12).addComponent(jLabel3)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane2).addContainerGap()));

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));

    jButton1.setBackground(new java.awt.Color(204, 204, 204));
    jButton1.setText("Check In");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });

    jPanel8.setBackground(new java.awt.Color(255, 255, 255));

    studentCombobox.setModel(new javax.swing.DefaultComboBoxModel<>(
            new String[] { "student1", "student2", "student3", "student4", "student5", "student6", "student7",
                    "student8", "student9", "student10", "student11", "student12", "student13", "student14",
                    "student15", "student16", "student17", "student18", "student19", "student20", "student21",
                    "student22", "student23", "student24", "student25" }));
    studentCombobox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            studentComboboxActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
    jPanel8.setLayout(jPanel8Layout);
    jPanel8Layout
            .setHorizontalGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                            .addComponent(studentCombobox, 0, 199, Short.MAX_VALUE).addContainerGap()));
    jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                    .addComponent(studentCombobox, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)));

    jButton2.setText("Graph");
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });

    javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("root");
    javax.swing.tree.DefaultMutableTreeNode treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Month1");
    javax.swing.tree.DefaultMutableTreeNode treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("1");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("2");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("3");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("4");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("5");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("6");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("7");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("8");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("9");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("10");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("11");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("12");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("13");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("14");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("15");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("16");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("17");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("18");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("19");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("20");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("21");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("22");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("23");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("24");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("25");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("26");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("27");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("28");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("29");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("30");
    treeNode2.add(treeNode3);
    treeNode1.add(treeNode2);
    treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Month2");
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("1");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("2");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("3");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("4");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("5");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("6");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("7");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("8");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("9");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("10");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("11");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("12");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("13");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("14");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("15");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("16");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("17");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("18");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("19");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("20");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("21");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("22");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("23");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("24");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("25");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("26");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("27");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("28");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("29");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("30");
    treeNode2.add(treeNode3);
    treeNode1.add(treeNode2);
    treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Month3");
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("1");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("2");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("3");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("4");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("5");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("6");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("7");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("8");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("9");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("10");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("11");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("12");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("13");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("14");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("15");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("16");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("17");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("18");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("19");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("20");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("21");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("22");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("23");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("24");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("25");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("26");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("27");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("28");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("29");
    treeNode2.add(treeNode3);
    treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("30");
    treeNode2.add(treeNode3);
    treeNode1.add(treeNode2);
    jTree1.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));
    jScrollPane1.setViewportView(jTree1);

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout
            .setHorizontalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                            .addGroup(jPanel3Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 689,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel3Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup().addGroup(jPanel3Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 56,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 60,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 591,
                                            Short.MAX_VALUE)))));

    jMenu1.setText("File");

    jMenuItem1.setText("open");
    jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
        }
    });
    jMenu1.add(jMenuItem1);

    jMenuBar1.add(jMenu1);

    jMenu2.setText("Check in");

    jMenuItem2.setText("Simulator");
    jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem2ActionPerformed(evt);
        }
    });
    jMenu2.add(jMenuItem2);

    jMenuBar1.add(jMenu2);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 12, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 37, Short.MAX_VALUE)));

    pack();
}