예제 #1
0
  public void initView() {
    ls_DataList = new javax.swing.JList();
    bt_Cancel = new javax.swing.JButton();
    bt_Update = new javax.swing.JButton();

    ls_DataList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    javax.swing.JScrollPane sp_DataList = new javax.swing.JScrollPane();
    sp_DataList.setViewportView(ls_DataList);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    javax.swing.GroupLayout.SequentialGroup hsg1 = layout.createSequentialGroup();
    hsg1.addComponent(bt_Update);
    hsg1.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED);
    hsg1.addComponent(bt_Cancel);
    javax.swing.GroupLayout.ParallelGroup hpg =
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING);
    hpg.addComponent(
        sp_DataList,
        javax.swing.GroupLayout.Alignment.LEADING,
        javax.swing.GroupLayout.DEFAULT_SIZE,
        220,
        Short.MAX_VALUE);
    hpg.addGroup(hsg1);
    javax.swing.GroupLayout.SequentialGroup hsg = layout.createSequentialGroup();
    hsg.addContainerGap();
    hsg.addGroup(hpg);
    hsg.addContainerGap();
    layout.setHorizontalGroup(hsg);

    javax.swing.GroupLayout.ParallelGroup vpg1 =
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE);
    vpg1.addComponent(bt_Cancel);
    vpg1.addComponent(bt_Update);
    javax.swing.GroupLayout.SequentialGroup vsg = layout.createSequentialGroup();
    vsg.addContainerGap();
    vsg.addComponent(sp_DataList, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE);
    vsg.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED);
    vsg.addGroup(vpg1);
    vsg.addContainerGap();
    layout.setVerticalGroup(vsg);

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setIconImage(Bean.getLogo(16));
  }
예제 #2
0
  public void initData() {
    bt_Cancel.addActionListener(
        new java.awt.event.ActionListener() {

          @Override
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            bt_CancelActionPerformed(evt);
          }
        });

    bt_Update.addActionListener(
        new java.awt.event.ActionListener() {

          @Override
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            bt_UpdateActionPerformed(evt);
          }
        });

    pack();
    Bean.centerForm(this, formPtn);
  }