import java.awt.*;
import java.awt.event.*;
import java.beans.*;
import javax.swing.border.*;
import com.borland.jbcl.layout.*;
import javax.swing.*;
import com.borland.dbswing.*;
import java.util.Vector;
import java.util.Date;
import java.text.SimpleDateFormat;
import com.mainet.ali.mts.inv.draw.ejb.session.*;import com.mainet.qd.basic.factory.EJBHomeFactory;import java.sql.Timestamp;
import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2002</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
*/public class AddTableFrame extends JFrame { JInternalFrame jif=new JInternalFrame("AliMTS-添加領料單",true,true,true); private JPanel HeadPanel = new JPanel();
// private JScrollPane BodyPane = new JScrollPane();
private JPanel BodyPanel = new JPanel(); private JPanel ButtonPanel = new JPanel();
private TitledBorder titledBorder1;
private PaneLayout paneLayout1 = new PaneLayout();
private TitledBorder titledBorder2;
private JLabel jLabel1 = new JLabel();
private JTextField jTextFieldShtdate = new JTextField();
private JLabel jLabel2 = new JLabel();
private JTextField jTextFieldShtno = new JTextField();
private JLabel jLabel3 = new JLabel();
private JTextField jTextFieldSysdate = new JTextField();
private JLabel jLabel4 = new JLabel();
private JLabel jLabel5 = new JLabel();
private JLabel jLabel6 = new JLabel();
private JLabel jLabel7 = new JLabel();
private JLabel jLabel8 = new JLabel();
private JLabel jLabel9 = new JLabel();
private JTextField jTextFieldUsrcfmdate = new JTextField();
private JTextField jTextFieldExseq = new JTextField();
private JTextField jTextFieldInvcfmdate = new JTextField();
private JTextField jTextFieldStatus = new JTextField();
private JLabel jLabel10 = new JLabel();
private JLabel jLabel11 = new JLabel();
private JLabel jLabel12 = new JLabel();
private JLabel jLabel13 = new JLabel();
private XYLayout xYLayout1 = new XYLayout();
private JTextField jTextFieldRmk = new JTextField();
private Border border1;
private TitledBorder titledBorder3;
private GridBagLayout gridBagLayout1 = new GridBagLayout();
import java.awt.event.*;
import java.beans.*;
import javax.swing.border.*;
import com.borland.jbcl.layout.*;
import javax.swing.*;
import com.borland.dbswing.*;
import java.util.Vector;
import java.util.Date;
import java.text.SimpleDateFormat;
import com.mainet.ali.mts.inv.draw.ejb.session.*;import com.mainet.qd.basic.factory.EJBHomeFactory;import java.sql.Timestamp;
import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2002</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
*/public class AddTableFrame extends JFrame { JInternalFrame jif=new JInternalFrame("AliMTS-添加領料單",true,true,true); private JPanel HeadPanel = new JPanel();
// private JScrollPane BodyPane = new JScrollPane();
private JPanel BodyPanel = new JPanel(); private JPanel ButtonPanel = new JPanel();
private TitledBorder titledBorder1;
private PaneLayout paneLayout1 = new PaneLayout();
private TitledBorder titledBorder2;
private JLabel jLabel1 = new JLabel();
private JTextField jTextFieldShtdate = new JTextField();
private JLabel jLabel2 = new JLabel();
private JTextField jTextFieldShtno = new JTextField();
private JLabel jLabel3 = new JLabel();
private JTextField jTextFieldSysdate = new JTextField();
private JLabel jLabel4 = new JLabel();
private JLabel jLabel5 = new JLabel();
private JLabel jLabel6 = new JLabel();
private JLabel jLabel7 = new JLabel();
private JLabel jLabel8 = new JLabel();
private JLabel jLabel9 = new JLabel();
private JTextField jTextFieldUsrcfmdate = new JTextField();
private JTextField jTextFieldExseq = new JTextField();
private JTextField jTextFieldInvcfmdate = new JTextField();
private JTextField jTextFieldStatus = new JTextField();
private JLabel jLabel10 = new JLabel();
private JLabel jLabel11 = new JLabel();
private JLabel jLabel12 = new JLabel();
private JLabel jLabel13 = new JLabel();
private XYLayout xYLayout1 = new XYLayout();
private JTextField jTextFieldRmk = new JTextField();
private Border border1;
private TitledBorder titledBorder3;
private GridBagLayout gridBagLayout1 = new GridBagLayout();
解决方案 »
- JAVA的问题,eclipse
- 问个低级的drawImage类问题
- 抽象方法的调用问题
- JAVA并发编程实践
- Java桌面程序,左边是树——用swing相关知识,点击不同节点在树的右边显示不同内容,怎么做到?请知道的务必帮帮忙,谢谢!!!在线等!!
- 紧急求助,这几个for循环里的判断条件是怎么来的,谢谢。
- 对象概念理解有误,求帮助!!
- 请问我在ScrollPanel中加入Jtable怎么出现横向滚动条,现在纵向的有
- 急!!!怎么似BufferedInputStream和BufferedOutputStream的Buffer定位于同一内存区块?
- 有关JListModel的问题,请高手指点
- 如何改正?(急,在线等)
- (高分求解)JComboBox中的Item有相同的值时
Vector detalRows = new Vector(); JTable detalTab = new JTable();
private JButton NextButton = new JButton();
private JButton jButtonDelete = new JButton();
private JComboBox jComboBoxDeptno = new JComboBox();
private JComboBox jComboBoxExpdeptno = new JComboBox();
private JComboBox jComboBoxUserid = new JComboBox();
private JComboBox jComboBoxLocaid = new JComboBox();
private JComboBox jComboBoxExid = new JComboBox();
private TitledBorder titledBorder4;
private TitledBorder titledBorder5;
private JButton AddButton = new JButton();
private JButton UndoButton = new JButton();
private JButton ExitButton1 = new JButton();
private Date now = new Date();
private Timestamp time = new Timestamp(now.getTime()); public AddTableFrame() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
public JInternalFrame createFrame(){
jif.setSize(790,548);
jif.setResizable(false);
jif.setClosable(true); jif.setVisible(true);
jif.setBackground(new Color(212, 208, 200));
jif.setLocation(1,0);
Border border;
border = BorderFactory.createLineBorder(Color.black); jif.setBorder(border) ; try {
jif.setSelected(true);
}
catch (PropertyVetoException ex) {
}
jif.show();
return jif;
}
private void jbInit() throws Exception {
SimpleDateFormat formater = new SimpleDateFormat("yy 年 MM 月 dd 日 ");
SimpleDateFormat timeformater = new SimpleDateFormat("yy - MM - dd HH:mm:ss ");
String strDate = formater.format(now) ;
String strTime = timeformater.format(now) ;
Vector detalRow = new Vector();
String[] items={"料號","型號","批號","領料數量","刻號註記","備註"};
for(int i = 0;i<6;i++){
columnName.add(i,items[i]); detalRow.add(i,""); } titledBorder4 = new TitledBorder("");
titledBorder5 = new TitledBorder("");
NextButton.setBorder(BorderFactory.createLineBorder(Color.black));
NextButton.setMaximumSize(new Dimension(66, 21));
NextButton.setMinimumSize(new Dimension(66, 21));
NextButton.setMnemonic('0');
NextButton.setText("添加新紀錄");
NextButton.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(MouseEvent e) {
NextButton_mouseClicked(e);
}
});
jButtonDelete.setMaximumSize(new Dimension(78, 21));
jButtonDelete.setMinimumSize(new Dimension(78, 21));
jButtonDelete.setText("刪除最後紀錄");
jButtonDelete.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(MouseEvent e) {
jButtonDelete_mouseClicked(e);
}
});
jTextFieldShtdate.setBackground(SystemColor.inactiveCaptionText);
jTextFieldShtdate.setEditable(false);
jTextFieldShtdate.setText(strDate);
jTextFieldStatus.setBackground(SystemColor.inactiveCaptionText);
jTextFieldStatus.setEditable(false);
jTextFieldStatus.setText("01: 立單");
jTextFieldInvcfmdate.setBackground(SystemColor.inactiveCaptionText);
jTextFieldInvcfmdate.setEditable(false);
jTextFieldInvcfmdate.setText("0");
jComboBoxDeptno.setBorder(BorderFactory.createLineBorder(Color.black));
jComboBoxDeptno.setMaximumSize(new Dimension(122, 20));
jComboBoxDeptno.setMinimumSize(new Dimension(122, 20));
jComboBoxDeptno.setPreferredSize(new Dimension(122, 20)); jComboBoxDeptno.insertItemAt("jg",0);
jComboBoxDeptno.insertItemAt("xs",1); jComboBoxExpdeptno.setBorder(BorderFactory.createLineBorder(Color.black));
jComboBoxExpdeptno.setMaximumSize(new Dimension(32767, 20));
jComboBoxExpdeptno.setMinimumSize(new Dimension(150, 20));
jComboBoxExpdeptno.setPreferredSize(new Dimension(150, 20));
jComboBoxExpdeptno.insertItemAt("js",0);
jComboBoxExpdeptno.insertItemAt("xs",1); jTextFieldUsrcfmdate.setBackground(SystemColor.inactiveCaptionText);
jTextFieldUsrcfmdate.setEditable(false);
jTextFieldUsrcfmdate.setText("0");
jComboBoxUserid.setBorder(BorderFactory.createLineBorder(Color.black));
jComboBoxUserid.setMaximumSize(new Dimension(32767, 20));
jComboBoxUserid.setMinimumSize(new Dimension(122, 20));
jComboBoxUserid.setPreferredSize(new Dimension(120, 20));
jComboBoxUserid.insertItemAt("zez",0);
jComboBoxUserid.insertItemAt("gll",1);
jComboBoxLocaid.setBorder(BorderFactory.createLineBorder(Color.black));
jComboBoxLocaid.setMaximumSize(new Dimension(32767, 20));
jComboBoxLocaid.setMinimumSize(new Dimension(150, 20));
jComboBoxLocaid.setPreferredSize(new Dimension(150, 20));
jComboBoxLocaid.setEditable(true);
jComboBoxLocaid.insertItemAt("c1",0);
jComboBoxLocaid.insertItemAt("c2",1);
jComboBoxExid.setBorder(BorderFactory.createLineBorder(Color.black));
jComboBoxExid.setPreferredSize(new Dimension(122, 20));
jComboBoxExid.insertItemAt("ca",0);
jComboBoxExid.insertItemAt("cb",1);
jTextFieldShtno.setBackground(SystemColor.inactiveCaptionText);
jTextFieldShtno.setEditable(false);
jTextFieldShtno.setText("test1112");
jTextFieldExseq.setBackground(SystemColor.inactiveCaptionText);
jTextFieldExseq.setEditable(false);
jTextFieldExseq.setText("2");
jTextFieldSysdate.setBackground(SystemColor.inactiveCaptionText);
jTextFieldSysdate.setText(strTime) ;
jTextFieldSysdate.setEditable(false);
AddButton.setToolTipText("確認添加領料單");
AddButton.setText("確認添加");
AddButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
AddButton_actionPerformed(e);
}
});
UndoButton.setText("清空還原");
UndoButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
UndoButton_actionPerformed(e);
}
});
ExitButton1.setText("退 出");
ExitButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
ExitButton1_actionPerformed(e);
}
});
detalRows.add(0,detalRow); detalTab=new JTable(detalRows,columnName);
titledBorder2 = new TitledBorder("");
border1 = BorderFactory.createLineBorder(SystemColor.controlText,2);
titledBorder3 = new TitledBorder("");
jif.getContentPane().setLayout(paneLayout1);
HeadPanel.setBorder(titledBorder1);
HeadPanel.setLayout(xYLayout1);
BodyPanel.setBorder(titledBorder2);
BodyPanel.setLayout(gridBagLayout1);
ButtonPanel.setBorder(BorderFactory.createLineBorder(Color.black));
titledBorder1.setTitle("領料單");
titledBorder2.setTitle("領料明細");
jLabel1.setText("立單日期:");
jTextFieldShtdate.setBorder(BorderFactory.createLineBorder(Color.black));
jLabel2.setText("單號號碼:");
jTextFieldShtno.setBorder(BorderFactory.createLineBorder(Color.black));
jLabel3.setText("系統日期:");
jTextFieldSysdate.setBorder(BorderFactory.createLineBorder(Color.black));
jLabel4.setText("出庫區分:");
jLabel5.setText("出庫倉別:");
jLabel6.setText("立單人:");
jLabel7.setText("領料部門:");
jLabel8.setText("費用歸屬部門:");
jLabel9.setText("確認日期:");
jTextFieldUsrcfmdate.setBorder(BorderFactory.createLineBorder(Color.black));
jTextFieldExseq.setBorder(BorderFactory.createLineBorder(Color.black));
jTextFieldInvcfmdate.setBorder(BorderFactory.createLineBorder(Color.black));
jTextFieldStatus.setBorder(BorderFactory.createLineBorder(Color.black));
jLabel10.setText("倉庫發料序號:");
jLabel11.setText("發料日期:");
jLabel12.setText("表單狀態:");
jLabel13.setText("備註:");
jTextFieldRmk.setBorder(BorderFactory.createLineBorder(Color.black)); jif.setMaximizable(false);
detalTab.setRowHeight(22);
detalTab.setBackground(new Color(181,214,255));
//detalTab.setPreferredScrollableViewportSize(new Dimension(828,355)); JScrollPane scr=new JScrollPane(detalTab); scr.setAutoscrolls(true);
scr.setBorder(BorderFactory.createLineBorder(Color.black));
scr.setToolTipText(""); BodyPanel.add(scr, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 10, 0, 10), 0, 0));
BodyPanel.add(NextButton, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.SOUTHEAST, GridBagConstraints.NONE, new Insets(2, 50, 1, 10), 0, 0));
BodyPanel.add(jButtonDelete, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.SOUTHEAST, GridBagConstraints.NONE, new Insets(2, 0, 1, 80), 0, 0)); HeadPanel.add(jTextFieldStatus, new XYConstraints(606, 121, 126, -1));
HeadPanel.add(jLabel13, new XYConstraints(16, 158, -1, -1));
HeadPanel.add(jLabel10, new XYConstraints(16, 122, -1, -1));
HeadPanel.add(jLabel4, new XYConstraints(16, 47, -1, -1));
HeadPanel.add(jTextFieldShtdate, new XYConstraints(90, 5, 126, -1));
HeadPanel.add(jTextFieldExseq, new XYConstraints(105, 119, 126, -1));
HeadPanel.add(jTextFieldRmk, new XYConstraints(90, 157, 645, -1));
HeadPanel.add(jLabel11, new XYConstraints(253, 123, -1, -1));
HeadPanel.add(jLabel8, new XYConstraints(253, 81, -1, -1));
HeadPanel.add(jLabel5, new XYConstraints(253, 43, -1, -1));
HeadPanel.add(jLabel2, new XYConstraints(253, 6, -1, -1));
HeadPanel.add(jTextFieldShtno, new XYConstraints(347, 2, 165, -1));
HeadPanel.add(jTextFieldInvcfmdate, new XYConstraints(347, 120, 165, -1));
HeadPanel.add(jTextFieldUsrcfmdate, new XYConstraints(606, 79, 126, -1));
HeadPanel.add(jTextFieldSysdate, new XYConstraints(606, 5, 126, -1));
HeadPanel.add(jLabel3, new XYConstraints(537, 4, -1, -1));
HeadPanel.add(jLabel6, new XYConstraints(537, 45, -1, -1));
HeadPanel.add(jLabel9, new XYConstraints(537, 81, -1, -1));
HeadPanel.add(jLabel12, new XYConstraints(537, 122, -1, -1));
HeadPanel.add(jLabel1, new XYConstraints(15, 10, -1, -1));
HeadPanel.add(jLabel7, new XYConstraints(16, 85, -1, -1));
jif.getContentPane().add(HeadPanel, new PaneConstraints("jPanel1", "jPanel1", PaneConstraints.ROOT, 0.5f));
jif.getContentPane().add(ButtonPanel, new PaneConstraints("jPanel3", "jPanel1", PaneConstraints.BOTTOM, 0.595978f));
ButtonPanel.add(AddButton, null);
ButtonPanel.add(UndoButton, null);
ButtonPanel.add(ExitButton1, null);
jif.getContentPane().add(BodyPanel, new PaneConstraints("jPanel2", "jPanel3", PaneConstraints.TOP, 0.84294873f));
HeadPanel.add(jComboBoxDeptno, new XYConstraints(89, 82, 126, -1));
HeadPanel.add(jComboBoxExpdeptno, new XYConstraints(347, 80, 165, -1));
HeadPanel.add(jComboBoxUserid, new XYConstraints(605, 44, 126, -1));
HeadPanel.add(jComboBoxLocaid, new XYConstraints(346, 39, 165, -1));
HeadPanel.add(jComboBoxExid, new XYConstraints(89, 46, -1, -1));
} void NextButton_mouseClicked(MouseEvent e) {
Vector detalRow = new Vector();
for(int i = 0 ; i < 6;i++){ detalRow.add(i,""); }
detalRows.add(detalTab.getRowCount(),detalRow) ;
detalTab.updateUI(); } void jButtonDelete_mouseClicked(MouseEvent e) {
if(detalTab.getRowCount() >0){
detalRows.remove(detalTab.getRowCount()-1) ;
detalTab.updateUI();}
} void UndoButton_actionPerformed(ActionEvent e) {
jTextFieldRmk.setText("") ;
jComboBoxDeptno.setSelectedIndex(-1);
jComboBoxExpdeptno.setSelectedIndex(-1);
jComboBoxUserid .setSelectedIndex(-1);
jComboBoxLocaid.setSelectedIndex(-1);
jComboBoxExid.setSelectedIndex(-1);
detalRows.removeAllElements() ;
Vector detalRow = new Vector();
for(int i=0;i<6;i++){ detalRow.add(i,"");
}
detalRows.add(0,detalRow) ;
detalTab.updateUI();
} void ExitButton1_actionPerformed(ActionEvent e) {
jif.dispose() ;
} void AddButton_actionPerformed(ActionEvent e) {
Vector bellhead = new Vector();
Vector belldetal = new Vector();
String shtno = jTextFieldShtno.getText() ;
Timestamp shtdate = time;
String exid = (String)jComboBoxExid.getSelectedItem() ;
String locaid = (String)jComboBoxLocaid.getSelectedItem();
String deptno = (String)jComboBoxDeptno.getSelectedItem();
String expdeptno = (String)jComboBoxExpdeptno.getSelectedItem() ;
String rmk = jTextFieldRmk.getText() ;
String exseq = jTextFieldExseq.getText() ;
String userid = (String)jComboBoxUserid.getSelectedItem() ;
Timestamp sysdate = time;
Timestamp usrcfmdate = null;
Timestamp expcfmdate = null;
Timestamp pcfmdate = null;
Timestamp invcfmdate = null;
String status = jTextFieldStatus.getText() ;
bellhead.add(0,shtno );
bellhead.add(1,shtdate );
bellhead.add(2,exid );
bellhead.add(3,locaid );
bellhead.add(4,deptno );
bellhead.add(5,expdeptno );
bellhead.add(6,rmk );
bellhead.add(7,exseq );
bellhead.add(8,userid );
bellhead.add(9,sysdate );
bellhead.add(10,usrcfmdate);
bellhead.add(11,expcfmdate);
bellhead.add(12,pcfmdate );
bellhead.add(13,invcfmdate);
bellhead.add(14,status);
try {
for(int i=0;i<detalRows.size() ;i++){
Vector tempvv = (Vector)detalRows.elementAt(i) ;
tempvv.setElementAt(new Integer((String)tempvv.elementAt(3)),3);
}
belldetal = detalRows; MtsSessionHome home = (MtsSessionHome)EJBHomeFactory.lookUpHome(MtsSessionHome.class);
MtsSession session = home.create() ;
session.insertPickingBill(bellhead,belldetal) ; MessageDialog dlg = new MessageDialog(this,"ok");
dlg.show();
UndoButton_actionPerformed( e);
}catch (NamingException ex) {
// ex.printStackTrace() ;
MessageDialog dlg = new MessageDialog(this,"error");
dlg.show();
UndoButton_actionPerformed( e);
}catch (Exception ex) {
// ex.printStackTrace() ;
MessageDialog dlg = new MessageDialog(this,"error");
dlg.show();
UndoButton_actionPerformed( e);
} }}
能否将你的小项目代码供我学习,本人学生,大三,急需学习经验
[email protected]
拜谢!
import javax.swing.*;/**
* Title:
* Description:
* Copyright: Copyright (c) 2003
* Company:
* @author
* @version 1.0
*/public class Frame5 extends JFrame {
GridBagLayout gridBagLayout1 = new GridBagLayout();
JLabel lblMailto = new JLabel();
JTextField txtMailto = new JTextField();
JLabel lblTitle = new JLabel();
JTextField txtTitle = new JTextField();
JLabel lblCC = new JLabel();
JTextField txtCC = new JTextField();
JTextArea txtBody = new JTextArea();
JLabel lblAttachment = new JLabel();
JComboBox cmbAttachment = new JComboBox();
JButton btnBrowse = new JButton(); public Frame5() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
Frame5 frame5 = new Frame5();
}
private void jbInit() throws Exception {
lblMailto.setToolTipText("");
lblMailto.setText("收件人:");
this.getContentPane().setLayout(gridBagLayout1);
txtMailto.setToolTipText("收件人信息...");
txtMailto.setColumns(20);
lblTitle.setText("标题:");
txtTitle.setToolTipText("标题信息...");
txtTitle.setColumns(20);
lblCC.setText("转发:");
txtCC.setToolTipText("转发信息...");
txtCC.setColumns(20);
txtBody.setToolTipText("信件内容...");
txtBody.setRows(10);
lblAttachment.setText("附件:");
btnBrowse.setPreferredSize(new Dimension(67, 22));
btnBrowse.setText("...");
cmbAttachment.setPreferredSize(new Dimension(150, 22));
this.getContentPane().add(lblMailto, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.getContentPane().add(txtMailto, new GridBagConstraints(1, 0, 2, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.getContentPane().add(lblTitle, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.getContentPane().add(txtTitle, new GridBagConstraints(1, 1, 2, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.getContentPane().add(lblCC, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.getContentPane().add(txtCC, new GridBagConstraints(1, 2, 2, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.getContentPane().add(txtBody, new GridBagConstraints(0, 3, 3, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
this.getContentPane().add(lblAttachment, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.getContentPane().add(cmbAttachment, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.getContentPane().add(btnBrowse, new GridBagConstraints(2, 4, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
pack();
show();
}
}