Exemplo n.º 1
0
 public void Margins_set(int left, int top, int right, int bot) {
   if (left == 0 && right == 0) {
     txt_box.setBorder(BorderFactory.createLineBorder(Color.BLACK));
     txt_box.setMargin(new Insets(0, 0, 0, 0));
   } else {
     //			txt_box.setBorder(BasicBorders.getTextFieldBorder());
     //			txt_box.setMargin(new Insets(0, l, 0, r));
     txt_box.setFont(new Font("Courier New", FontStyleAdp_.Plain.Val(), 12));
     txt_box.setBorder(
         BorderFactory.createCompoundBorder(
             BorderFactory.createLineBorder(Color.BLACK),
             BorderFactory.createEmptyBorder(top, left, bot, right)));
   }
 }