Esempio n. 1
0
  private void init() throws Exception {
    //            dateField.setToolTipText("鍗曞嚮鍙宠竟鐨勬寜閽嵆鍙�夋嫨鏃ユ湡");
    btnChoose.setToolTipText("鍗曞嚮鍗冲彲閫夋嫨鏃ユ湡");
    this.setLayout(gridBagLayout1);
    //            	this.setLayout(null);
    //            dateField.setEditable(true);
    //            btnChoose.addActionListener(new ActionListener() {
    //                public void actionPerformed(ActionEvent e) {
    //                    DateChooserJButton.this.btnChoose_actionPerformed(e);
    //                }
    //            });
    btnChoose.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mousePressed(MouseEvent e) {
            MyDateChooseBtn.this.btnChoose_actionPerformed();
            super.mousePressed(e);
          }
        });
    Date date = new Date();
    SimpleDateFormat simpleDateFormat = new SimpleDateFormat(parten);
    //            this.setText(simpleDateFormat.format(date));
    //            Jtext.setText(simpleDateFormat.format(date));
    //            this.add(dateField, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
    //                , GridBagConstraints.CENTER,
    //                GridBagConstraints.NONE,
    //                new Insets(0, 0, 0, 0), this.length, 0));
    this.add(
        btnChoose,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.NONE,
            new Insets(0, 0, 0, 0),
            0,
            0));

    //           this. add(btnChoose);
  }
Esempio n. 2
0
 public void setToolTipText(String text) {
   //            dateField.setToolTipText(text);
   btnChoose.setToolTipText(text);
 }