Example #1
2
  AdminMain() {
    l = new JLabel();
    l.setBounds(10, 20, 1340, 1000);
    l.setBackground(Color.black);
    Font ft = new Font("Arial", Font.BOLD, 30);
    Font ft1 = new Font("Arial", Font.BOLD, 14);
    Font ft2 = new Font("Arial", Font.BOLD, 20);

    f1 = new Frame("Soft Test Management (Beta)");
    f1.setLayout(null);

    l1 = new Label("Test Instructions", l1.CENTER);
    l1.setBounds(10, 20, 1300, 60);
    l1.setForeground(Color.blue);
    l1.setBackground(Color.white);
    l1.setFont(ft);

    l2 = new JLabel("Deletion of Faculty/Students");
    l2.setBounds(20, 30, 1000, 500);
    l2.setBackground(Color.blue);
    l2.setFont(ft2);
    l3 = new JLabel("Test Pattern");
    l3.setBounds(20, 90, 1300, 500);
    l3.setBackground(Color.green);
    l3.setFont(ft2);

    b1 = new JButton("Go !");
    b1.setBounds(300, 220, 120, 30);
    b1.setBackground(Color.white);
    b1.setForeground(Color.blue);
    b1.setFont(ft2);

    b2 = new JButton("Go");
    b2.setBounds(300, 240, 120, 30);
    b2.setBackground(Color.white);
    b2.setForeground(Color.blue);
    b2.setFont(ft2);

    f1.add(l);
    l.add(l1);
    l2.add(b1);
    l.add(l2);
    l3.add(b2);
    l.add(l3);

    b1.addActionListener(this);
    b2.addActionListener(this);

    f1.setVisible(true);
    f1.setSize(1800, 800);
  }
  public LayerDesignPanel(MainFrame father) {
    this.father = father;

    this.setLayout(null);

    jsp.setBounds(10, 10, 800, 600);
    this.add(jsp);

    jspL.setBounds(820, 10, 140, 200);
    this.add(jspL);
    jl.setCellRenderer(new MyCellRenderer());

    jbSaveLayer.setBounds(820, 220, 140, 20);
    this.add(jbSaveLayer);
    jbSaveLayer.addActionListener(this);

    jbLoadLayer.setBounds(820, 250, 140, 20);
    this.add(jbLoadLayer);
    jbLoadLayer.addActionListener(this);

    jbCreate.setBounds(820, 280, 140, 20);
    this.add(jbCreate);
    jbCreate.addActionListener(this);

    jbLoadAll.setBounds(820, 310, 140, 20);
    this.add(jbLoadAll);
    jbLoadAll.addActionListener(this);

    jtfCengMing.setBounds(820, 340, 140, 20);
    this.add(jtfCengMing);
  }
  public SurrenderUI() {
    setType(Type.UTILITY);

    ExitB = new JButton("Exit");
    ExitB.setFont(new Font("Tahoma", Font.BOLD, 12));
    ExitB.setBackground(new Color(255, 215, 0));
    ExitB.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            dispose();
            new HSmain();
          }
        });
    ExitB.setBounds(461, 427, 296, 60);

    setTitle("Surrendering a Pet");
    Container pane = getContentPane();
    getContentPane().setLayout(null);
    pane.add(ExitB);

    txtSurrender = new JTextField();
    txtSurrender.setEditable(false);
    txtSurrender.setForeground(new Color(0, 0, 0));
    txtSurrender.setBackground(new Color(255, 215, 0));
    txtSurrender.setBounds(10, 11, 764, 50);
    txtSurrender.setHorizontalAlignment(SwingConstants.CENTER);
    txtSurrender.setFont(new Font("Lucida Handwriting", Font.BOLD, 18));
    txtSurrender.setText("Surrendering a Pet");
    getContentPane().add(txtSurrender);
    txtSurrender.setColumns(10);

    BackB = new JButton("Back");
    BackB.setFont(new Font("Tahoma", Font.BOLD, 12));
    BackB.setBackground(new Color(255, 215, 0));
    BackB.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            new AnimalServiceUI();
            dispose();
          }
        });
    BackB.setBounds(26, 427, 320, 60);
    getContentPane().add(BackB);

    scrollPane = new JScrollPane();
    scrollPane.setBounds(0, 72, 764, 329);
    getContentPane().add(scrollPane);

    JTextPane txtSurrenderInfo = new JTextPane();
    scrollPane.setViewportView(txtSurrenderInfo);
    txtSurrenderInfo.setForeground(new Color(0, 0, 0));
    txtSurrenderInfo.setEditable(false);
    txtSurrenderInfo.setFont(new Font("Times New Roman", Font.BOLD, 15));
    txtSurrenderInfo.setText(
        "\tThe Humane Society of Lamar cannot accept every animal brought to our shelter immediately. \r\nWe respect the difficult decision of owners to relinquish their pets, and the hard choices of those \r\ngood citizens who are trying to help a stray. We accept the surrender of pets as space allows. \r\nWe maintain a waiting list for all animals needing to be admitted to the shelter.\r\nAnimals are surrendered to our facility by appointment.\r\nWe admit at least 12 animals per week. We accept more animals as adoptions and space allow.\r\nNote that we cannot accept aggressive, sick or pregnant animals.\r\nPlease call 409-225-7981, and one of our adoption specialists will speak to you.\r\nAt times our waiting list will have up to 100 animals waiting for admission and it can take several weeks \r\nbefore we can admit your pet.\r\nPlease understand that our primary goal is to place as many animals in forever homes as possible, \r\ntherefore we must give every pet admitted to the shelter enough time to find a loving home. \r\nWe cannot guarantee placement of every animal admitted to the shelter.\r\n\t\r\n\tAdmission of any animal into the Humane Society of Lamar  is based on the animal\u2019s health, \r\nbehavior, and adoptability. When you bring your pets, please have:\r\n\r\n    *Any veterinary records\r\n    *Your pet\u2019s medications\r\n    *Special food or treats that your pet needs\r\n    *Your pet\u2019s bed, toys, leash and other belongings from home\r\n\r\nA staff member will evaluate the temperament of your pet. Once your pet has been screened, \r\nand the Humane Society of Lamar decides to accept your pet, we ask a donation to our shelter to be made. \r\nThis is not required, but will greatly help us care for your pet.");

    setSize(800, 553);
    setVisible(true);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
  }
Example #4
0
  /**
   * Bedingungen und Positionen der Bestandteile
   *
   * @param Title Legt den Titeltext fest
   */
  public Faehigkeiten(String Title) {
    super(Title);

    text =
        new JLabel(
            "                     Manaentzug: 5XP  Lebensentzug: 10XP  Elementarmeister: 15 XP"); // Legt den ersten Text im Label fest
    text.setFont(new Font("Serif", Font.PLAIN, 14)); // Legt Schriftgroesse und Font fest
    getContentPane().add(text);

    nummer1 = new JButton("Manaentzug"); // definiert Position und Größe für die Buttons
    nummer1.setBounds(50, 170, 200, 80);
    nummer1.addActionListener(this);

    nummer2 = new JButton("Elementarmeister"); // definiert Position und Größe für die Buttons
    nummer2.setBounds(190, 400, 200, 80);
    nummer2.addActionListener(this);

    nummer3 = new JButton("Lebensentzug"); // definiert Position und Größe für die Buttons
    nummer3.setBounds(330, 170, 200, 80);
    nummer3.addActionListener(this);

    if (Board.manaleech == false) {
      add(nummer1);
    }
    if (Board.elementarmeister == false) {
      add(nummer2); // fuegt die Buttons und den Text im ersten Label zu
    }
    if (Board.lifeleech == false) {
      add(nummer3);
    }
    add(text);
  }
Example #5
0
 public PlayGamePanel(JFrame frame, BoardConfiguration bc) {
   this.bc = bc;
   this.frame = frame;
   ImageIcon icon = new ImageIcon("ent.jpg");
   this.image = icon.getImage();
   this.one = new TransparentButton("1 Player");
   this.two = new TransparentButton("2 Players");
   this.three = new TransparentButton("3 Players");
   this.four = new TransparentButton("4 Players");
   this.setSize(frame.getSize());
   this.setLocation(0, 0);
   this.setLayout(null);
   one.setBounds(450, 140, 200, 40);
   two.setBounds(450, 200, 200, 40);
   three.setBounds(450, 260, 200, 40);
   four.setBounds(450, 320, 200, 40);
   this.add(one);
   this.add(two);
   this.add(three);
   this.add(four);
   this.back = new TransparentButton("Back");
   back.setBounds(450, 380, 200, 40);
   this.add(back);
   this.one.setFont(new Font("calibri", Font.ITALIC, 30));
   this.two.setFont(new Font("calibri", Font.ITALIC, 30));
   this.three.setFont(new Font("calibri", Font.ITALIC, 30));
   this.four.setFont(new Font("calibri", Font.ITALIC, 30));
   this.back.setFont(new Font("calibri", Font.ITALIC, 30));
   this.one.addMouseListener(this);
   this.two.addMouseListener(this);
   this.three.addMouseListener(this);
   this.four.addMouseListener(this);
   this.back.addMouseListener(this);
   this.back.setForeground(Color.red);
 }
 public int doLayoutRetHeight() {
   Dimension sz = getSize();
   final int itemHeight = 25;
   final int itemSpacing = 5;
   final int labelWidth = 150;
   final int buttonHeight = 35;
   final int buttonWidth = 100;
   int y = itemSpacing;
   int fieldWidth = sz.width - (itemSpacing + labelWidth + itemSpacing + itemSpacing);
   int fieldX = itemSpacing + labelWidth + itemSpacing;
   int buttonSpacing = (sz.width - (buttonWidth + buttonWidth)) / 4;
   labelFileName.setBounds(itemSpacing, y, labelWidth, itemHeight);
   textFileName.setBounds(fieldX, y, fieldWidth, itemHeight);
   y = y + itemHeight + itemSpacing;
   labelLogContents.setBounds(itemSpacing, y, labelWidth, itemHeight);
   int logContentsHeight = sz.height - (y + buttonHeight + itemSpacing + itemSpacing);
   if (logContentsHeight < 100) {
     logContentsHeight = 100;
   }
   textLogContents.setBounds(fieldX, y, fieldWidth, logContentsHeight);
   y = y + logContentsHeight + itemSpacing + itemSpacing;
   buttonChooseFile.setBounds(buttonSpacing, y, buttonWidth, buttonHeight);
   buttonImportFile.setBounds(
       buttonSpacing + buttonWidth + buttonSpacing, y, buttonWidth, buttonHeight);
   buttonClose.setBounds(
       buttonSpacing + buttonWidth + buttonSpacing + buttonWidth + buttonSpacing,
       y,
       buttonWidth,
       buttonHeight);
   y = y + buttonHeight + itemSpacing + itemSpacing;
   return (y);
 }
 public CFSecuritySwingISOCurrencyAskDeleteJPanel(
     ICFSecuritySwingSchema argSchema, ICFSecurityISOCurrencyObj argFocus) {
   super();
   final String S_ProcName = "construct-schema-focus";
   if (argSchema == null) {
     throw CFLib.getDefaultExceptionFactory()
         .newNullArgumentException(getClass(), S_ProcName, 1, "argSchema");
   }
   // argFocus is optional; focus may be set later during execution as
   // conditions of the runtime change.
   swingSchema = argSchema;
   swingFocus = argFocus;
   // Construct the various objects
   textAreaMessage = new JTextArea("Are you sure you want to delete this ISO Currency?");
   actionOk = new ActionOk();
   actionCancel = new ActionCancel();
   buttonOk = new JButton(actionOk);
   buttonCancel = new JButton(actionCancel);
   attrJPanel = argSchema.getISOCurrencyFactory().newAttrJPanel(argFocus);
   scrollPane = new CFHSlaveJScrollPane(attrJPanel);
   // Lay out the widgets
   setSize(1024, 480);
   Dimension min = new Dimension(480, 300);
   setMinimumSize(min);
   add(textAreaMessage);
   textAreaMessage.setBounds(0, 0, 1024, 50);
   int xparts = (768 - (2 * 125)) / 3;
   add(buttonOk);
   buttonOk.setBounds(xparts, 55, 125, 40);
   add(buttonCancel);
   buttonCancel.setBounds(xparts + 125 + xparts, 55, 125, 40);
   add(scrollPane);
   scrollPane.setBounds(0, 100, 1024, 480 - 100);
 }
Example #8
0
  /** Construtor da classe GameBoard */
  public GameView(GameController controller, GameEngine engine) {

    super("Regras");
    this.controller = controller;
    this.engine = engine;

    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setBounds(550, 200, 350, 250);

    this.setVisible(true);
    this.setLayout(null);

    selecione = new JLabel("Selecione uma das regras para o jogo:");
    selecione.setBounds(60, 30, 300, 30);
    add(selecione);

    conway = new JButton("Conway");
    add(conway);
    conway.setBounds(30, 80, 120, 40);
    highlife = new JButton("Highlife");
    add(highlife);
    highlife.setBounds(170, 80, 120, 40);

    livefreeordie = new JButton("LiveFreeOrDie");
    add(livefreeordie);
    livefreeordie.setBounds(100, 140, 120, 40);

    ButtonHandler handler = new ButtonHandler();
    conway.addActionListener(handler);
    highlife.addActionListener(handler);
    livefreeordie.addActionListener(handler);
  }
  public Welcome() {
    c.setLayout(null);

    c.add(welcome);
    welcome.setBounds(250, 100, 600, 50);
    welcome.setFont(font1);
    welcome.setForeground(Color.black);

    c.add(hotel);
    hotel.setBounds(350, 170, 700, 50);
    hotel.setFont(font2);
    hotel.setForeground(Color.black);

    c.add(check);
    check.setBounds(450, 350, 250, 50);
    check.addActionListener(this);

    c.add(order);
    order.setBounds(150, 350, 250, 50);
    order.addActionListener(this);

    c.add(bill);
    bill.setBounds(750, 350, 250, 50);
    bill.addActionListener(this);

    c.add(exit);
    exit.setBounds(40, 600, 130, 20);
    exit.addActionListener(this);

    c.add(back).setBounds(0, 0, 1800, 1000);
  }
Example #10
0
  public MenuPainel() {

    try {
      i = ImageIO.read(new File("21.jpg"));
    } catch (IOException e) {
      System.out.println(e.getMessage());
      System.exit(1);
    }

    this.setLayout(null);

    JButton newgame = new JButton("Iniciar Jogo");
    newgame.setBounds(20, 240, 200, 30);
    newgame.setName("NovoJogo");
    newgame.addMouseListener(tt);

    JButton rules = new JButton("Regras");
    rules.setBounds(20, 280, 200, 30);
    rules.setName("Regras");
    rules.addMouseListener(tt);

    JButton exit = new JButton("Sair");
    exit.setBounds(20, 320, 200, 30);
    exit.setName("Sair");
    exit.addMouseListener(tt);

    this.add(newgame);
    this.add(rules);
    this.add(exit);
  }
Example #11
0
  loginframe() {
    Container c = getContentPane();
    c.setLayout(null);
    Color co1 = new Color(252, 251, 251);
    Color co2 = new Color(153, 153, 153);
    Color co3 = new Color(0, 0, 0);
    Font fo1 = new Font("Curlz MT", Font.BOLD, 35);
    Font fo2 = new Font("Tahoma", Font.BOLD, 14);
    Font fo3 = new Font("Tahoma", Font.PLAIN, 12);

    l1 = new JLabel("LOGIN");
    l1.setFont(fo1);
    c.add(l1);
    l1.setBounds(130, 30, 200, 30);
    l1.setForeground(co1);

    l2 = new JLabel("Username");
    c.add(l2);
    l2.setBounds(130, 100, 100, 30);
    l2.setForeground(co1);
    l2.setFont(fo2);

    l3 = new JLabel("Password");
    c.add(l3);
    l3.setBounds(130, 150, 100, 30);
    l3.setForeground(co1);
    l3.setFont(fo2);

    t1 = new JTextField();
    t1.setBounds(250, 100, 120, 25);
    c.add(t1);
    t1.setBackground(co2);
    t1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    t1.setForeground(co3);
    t1.setFont(fo3);

    p1 = new JPasswordField();
    p1.setBounds(250, 150, 120, 25);
    c.add(p1);
    p1.setBackground(co2);
    p1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    b1 = new JButton("Login");
    b1.setBounds(140, 220, 70, 30);
    b1.addActionListener(this);
    c.add(b1);

    b2 = new JButton("Exit");
    b2.setBounds(270, 220, 70, 30);
    b2.addActionListener(this);
    c.add(b2);

    l4 = new JLabel("");
    c.add(l4);
    l4.setBounds(0, 0, 464, 409);
    l4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/loginpackage/locked2_1.jpg")));
  }
Example #12
0
  public hostelStatus() {
    setTitle("Hostel");
    connect();
    updateRecord();

    JFrame fr = new JFrame();
    Toolkit tkt = fr.getToolkit();
    Dimension frsize = tkt.getScreenSize();
    setBounds(frsize.width / 4, frsize.height / 12, frsize.width / 2, frsize.height / 8);
    setLayout(null);

    cn = getContentPane();
    cn.setBackground(new Color(190, 180, 170));

    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

    tl = new JLabel("Current Hostels Status");
    tl.setFont(new Font("Engravers MT", 1, 25));
    tl.setForeground(new Color(247, 251, 249));

    p1 = new JPanel();
    p1.setBounds(0, 0, 600, 50);
    p1.add(tl);
    p1.setBackground(new Color(31, 88, 166));
    cn.add(p1);

    b1 = new JButton("LOAD");
    b1.setMnemonic('L');
    b1.addActionListener(new dispListener());
    b1.setBounds(230, 320, 120, 30);

    b2 = new JButton("EXIT");
    b2.setMnemonic('X');
    b2.addActionListener(new exitListener());
    b2.setBounds(350, 320, 100, 30);

    cn.add(b1);
    cn.add(b2);

    table = new JTable(data, col);
    table.setFont(new Font("Serif", Font.BOLD, 16));
    table.setBackground(new Color(250, 250, 250));
    table.setEnabled(false);

    JScrollPane jsp = new JScrollPane(table);
    jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    jsp.setBounds(5, 100, 590, 200);
    cn.add(jsp);

    screensize = Toolkit.getDefaultToolkit().getScreenSize();

    setSize(600, 400);
    setVisible(true);
    setVisible(true);
    setResizable(true);
    connect();
  }
 public void doLayout() {
   Dimension sz = getSize();
   textAreaMessage.setBounds(0, 0, sz.width, 50);
   int xparts = (sz.width - (2 * 125)) / 3;
   buttonOk.setBounds(xparts, 55, 125, 40);
   buttonCancel.setBounds(xparts + 125 + xparts, 55, 125, 40);
   scrollPane.setBounds(0, 100, sz.width, sz.height - 100);
   scrollPane.doLayout();
 }
Example #14
0
  public Perfil() {
    super.setBounds(181, 61, 700, 538); // (ancho,alto)
    super.setLayout(null);
    super.setOpaque(false);
    super.setVisible(false);

    try {
      UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
      ex.printStackTrace();
    }

    jbtnGuardar = new JButton("Guardar Cambios");
    jbtnGuardar.setBounds(55, 457, 150, 40);
    jbtnGuardar.addActionListener(this);
    jbtnGuardar.setBorder(null);
    jbtnGuardar.setBackground(new Color(0, 154, 225));
    jbtnGuardar.setForeground(Color.WHITE);
    jbtnGuardar.setFont(new Font("Segoe UI", Font.PLAIN, 14));
    jbtnGuardar.setCursor(new Cursor(java.awt.Cursor.HAND_CURSOR));
    jbtnGuardar.setFocusPainted(false);
    this.add(jbtnGuardar);

    nombre = new JLabel("Ninguna imagen seleccionada");
    nombre.setBounds(210, 250, 200, 40);
    nombre.setForeground(Color.GRAY);
    this.add(nombre);

    jbtnCargarI = new JButton("Cargar imagen");
    jbtnCargarI.setBounds(55, 250, 150, 40);
    jbtnCargarI.addActionListener(this);
    jbtnCargarI.setBorder(null);
    jbtnCargarI.setBackground(new Color(0, 154, 225));
    jbtnCargarI.setForeground(Color.WHITE);
    jbtnCargarI.setFont(new Font("Segoe UI", Font.PLAIN, 14));
    jbtnCargarI.setCursor(new Cursor(java.awt.Cursor.HAND_CURSOR));
    jbtnCargarI.setFocusPainted(false);
    this.add(jbtnCargarI);

    jbtnQuitarI = new JButton("Quitar imagen");
    jbtnQuitarI.setBounds(55, 186, 150, 40);
    jbtnQuitarI.addActionListener(this);
    jbtnQuitarI.setBorder(null);
    jbtnQuitarI.setBackground(new Color(0, 154, 225));
    jbtnQuitarI.setForeground(Color.WHITE);
    jbtnQuitarI.setFont(new Font("Segoe UI", Font.PLAIN, 14));
    jbtnQuitarI.setCursor(new Cursor(java.awt.Cursor.HAND_CURSOR));
    jbtnQuitarI.setFocusPainted(false);
    this.add(jbtnQuitarI);

    jlbimage = new JLabel();
    jlbimage.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1));
    jlbimage.setBounds(55, 46, 150, 150);
    this.add(jlbimage);

    this.repaint();
  }
Example #15
0
  /** Initialize the contents of the frame. */
  private void initialize() {
    frame = new JFrame();
    frame.setBounds(100, 100, 450, 300);
    frame.setVisible(true);
    frame.setResizable(false);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().setLayout(null);

    JButton btnCustomer = new JButton("Customer");
    btnCustomer.setFont(new Font("Tahoma", Font.BOLD, 16));
    btnCustomer.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            JOptionPane.showMessageDialog(null, "Welcome to Coffee Kiosk ");
            // Coffee1 nw = new Coffee1();
            // nw.NewScreen();
            cust = cust + 1;
            Customer cs = new Customer();
            cs.CustomerScreen();
          }
        });
    btnCustomer.setBounds(83, 94, 117, 86);
    frame.getContentPane().add(btnCustomer);

    JButton btnAdmin = new JButton("Admin");
    btnAdmin.setFont(new Font("Tahoma", Font.BOLD, 16));
    btnAdmin.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            JOptionPane.showMessageDialog(null, "Welcome Admin ");
            Login ls = new Login();
            ls.LoginScreen();
          }
        });

    btnAdmin.setBounds(229, 94, 117, 86);
    frame.getContentPane().add(btnAdmin);

    JButton btnExit = new JButton("EXIT");
    btnExit.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            JOptionPane.showMessageDialog(null, "Thank You for using Coffee Kiosk");
            System.exit(0);
          }
        });
    btnExit.setBounds(168, 207, 89, 23);
    frame.getContentPane().add(btnExit);

    JLabel lblLeedsCoffeeKiosk = new JLabel("LEEDS COFFEE KIOSK");
    lblLeedsCoffeeKiosk.setHorizontalAlignment(SwingConstants.CENTER);
    lblLeedsCoffeeKiosk.setFont(new Font("Times New Roman", Font.BOLD | Font.ITALIC, 30));
    lblLeedsCoffeeKiosk.setForeground(new Color(148, 0, 211));
    lblLeedsCoffeeKiosk.setBounds(36, 11, 366, 72);
    frame.getContentPane().add(lblLeedsCoffeeKiosk);
  }
Example #16
0
 private void jbInit() throws Exception {
   this.getContentPane().setLayout(null);
   Bienvenue.setFont(new java.awt.Font("Garamond", 1, 24));
   Bienvenue.setForeground(SystemColor.textHighlight);
   Bienvenue.setRequestFocusEnabled(true);
   Bienvenue.setVerifyInputWhenFocusTarget(true);
   Bienvenue.setText("Bienvenue dans JChat");
   Bienvenue.setBounds(new Rectangle(125, 28, 305, 44));
   Pseudo_L.setFont(new java.awt.Font("Dialog", 1, 14));
   Pseudo_L.setText("Pseudonyme :");
   Pseudo_L.setBounds(new Rectangle(75, 94, 128, 28));
   nom.setText("");
   nom.setBounds(new Rectangle(229, 95, 108, 24));
   pwd.setText("");
   pwd.setBounds(new Rectangle(230, 135, 108, 25));
   pwd_L.setFont(new java.awt.Font("Dialog", 1, 14));
   pwd_L.setText("Mot de passe :");
   pwd_L.setBounds(new Rectangle(76, 133, 122, 31));
   gestionnaire_B gestionnaire = new gestionnaire_B();
   Connect.addActionListener(gestionnaire);
   Connect.setBackground(new Color(239, 240, 234));
   Connect.setBounds(new Rectangle(281, 251, 142, 30));
   Connect.setText("Connexion");
   Connect.setIcon(new ImageIcon(image_c));
   Annuler.addActionListener(gestionnaire);
   Annuler.setBackground(new Color(239, 240, 234));
   Annuler.setBounds(new Rectangle(104, 252, 140, 29));
   Annuler.setText("Annuler");
   Annuler.setIcon(new ImageIcon(image_d));
   this.getContentPane().setBackground(new Color(239, 240, 234));
   this.setForeground(new Color(239, 240, 234));
   this.setTitle("Interface de connexion des clients au serveur de chat");
   jLabel1.setFont(new java.awt.Font("Dialog", 1, 14));
   jLabel1.setText("Adresse du serveur :");
   jLabel1.setBounds(new Rectangle(75, 176, 156, 26));
   jTextField1.setBounds(new Rectangle(230, 176, 108, 25));
   Icon siegle = new ImageIcon(image);
   siegle_L = new JLabel("", siegle, SwingConstants.LEFT);
   siegle_L.setBounds(new Rectangle(0, 1, 76, 105));
   this.getContentPane().add(jLabel1, null);
   this.getContentPane().add(pwd_L, null);
   this.getContentPane().add(Pseudo_L, null);
   this.getContentPane().add(jTextField1, null);
   this.getContentPane().add(nom, null);
   this.getContentPane().add(pwd, null);
   this.getContentPane().add(Bienvenue, null);
   this.getContentPane().add(Connect, null);
   this.getContentPane().add(Annuler, null);
   this.getContentPane().add(siegle_L, null);
   this.setSize(new Dimension(439, 321));
   this.setResizable(false);
   this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   this.setVisible(true);
 }
Example #17
0
  public TripleTilePatcher() {
    setResizable(false);
    setTitle("Day/Night Pokemon Patcher");
    this.setSize(371, 150);
    getContentPane().setLayout(null);

    btnPatch = new JButton("Patch!");
    btnPatch.setBounds(271, 113, 81, 25);
    getContentPane().add(btnPatch);

    btnCancel = new JButton("Cancel");
    btnCancel.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            setVisible(false);
            dispose();
          }
        });
    btnCancel.setBounds(178, 113, 81, 25);
    getContentPane().add(btnCancel);

    JLabel lblThisDialogWill =
        new JLabel(
            "<html><center>This dialog will patch in support for reference-based triple layer tiles in Fire Red. Since this is an optimised rewrite of the existing renderer, no free space is needed and the routine will be written over the existing renderer.</center></html>");
    lblThisDialogWill.setBounds(12, 30, 340, 60);
    getContentPane().add(lblThisDialogWill);

    lblError = new JLabel("");
    lblError.setBounds(22, 142, 119, 69);
    getContentPane().add(lblError);

    btnPatch.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            if (successfulPatch) {
              setVisible(false);
              dispose();
            }

            if (patchROM()) {
              lblError.setForeground(MainGUI.uiSettings.cursorColor);
              lblError.setText("<html><center>Success!</center></html>");
              btnCancel.setVisible(false);
              btnPatch.setText("Close");
              successfulPatch = true;
            }
          }
        });

    if (ROMManager.getActiveROM() == null) {
      this.setVisible(false);
      this.dispose();
    }
  }
  /** Enters full screen mode and changes the display mode. */
  public void setFullScreen(DisplayMode displayMode, JFrame window) {

    window.setUndecorated(true);
    window.setResizable(false);
    cmdemo bgd = new cmdemo();
    JList mission = new JList(string);
    mission.setVisibleRowCount(4);
    JScrollPane pane = new JScrollPane(mission);
    pane.setBounds(400, 400, 225, 70);
    window.getContentPane().add(pane);

    muButton.setBounds(764 - 120, 625 - 10, 225, 49);
    textField1.setBounds(630 - 120, 328 - 10, 225, 25);
    window.getContentPane().add(muButton);
    window.getContentPane().add(textField1);
    // window.add(bgd);
    muButton.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION);
    muButton.setToolTipText("start");
    muButton.setBorder(null);
    muButton.setRolloverIcon(new javax.swing.ImageIcon("imgs/start1.jpg"));
    muButton.addActionListener(
        new java.awt.event.ActionListener() {

          public void actionPerformed(java.awt.event.ActionEvent evt) {
            startActionPerformed(evt);
          }
        });

    aButton.setBounds(284 - 120, 625 - 10, 225, 49);
    window.getContentPane().add(aButton);
    window.add(bgd);
    aButton.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION);
    aButton.setToolTipText("back");
    aButton.setBorder(null);
    aButton.setRolloverIcon(new javax.swing.ImageIcon("imgs/back1.jpg"));

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

          public void actionPerformed(java.awt.event.ActionEvent evt) {
            backActionPerformed(evt);
          }
        });

    device.setFullScreenWindow(window);
    if (displayMode != null && device.isDisplayChangeSupported()) {
      try {
        device.setDisplayMode(displayMode);
      } catch (IllegalArgumentException ex) {
        // ignore - illegal mode for this device
      }
    }
  }
Example #19
0
  private void initMainPanel() {
    mainPanel = new JPanel(null);

    searchField = new JTextField();
    searchField.setBounds(50, 50, 830, 20);
    searchField
        .getDocument()
        .addDocumentListener(
            new DocumentListener() {
              @Override
              public void insertUpdate(DocumentEvent e) {}

              @Override
              public void removeUpdate(DocumentEvent e) {
                listSearchTable = null;
              }

              @Override
              public void changedUpdate(DocumentEvent e) {}
            });
    searchField.addActionListener(new Action());

    searchButton =
        new JButton(
            new ImageIcon(
                "/home/mrhappyyy/Programing/Java/Project/Laboratory/Client_Laboratory/src/windows/search.png"));
    searchButton.setBorderPainted(false);
    searchButton.setBounds(900, 35, 50, 50);
    searchButton.addActionListener(new Action());

    updateTable =
        new JButton(
            new ImageIcon(
                "/home/mrhappyyy/Programing/Java/Project/Laboratory/Client_Laboratory/src/windows/refresh.png"));
    updateTable.setBorderPainted(false);
    updateTable.setBounds(900, 100, 50, 50);
    updateTable.addActionListener(new Action());

    productTableModel = new ProductTableModel();
    table = new JTable(productTableModel);
    scroll = new JScrollPane(table);
    scroll.setBounds(50, 85, 830, 450);

    mainPanel.add(searchField);
    mainPanel.add(searchButton);
    mainPanel.add(updateTable);
    mainPanel.add(scroll);

    clarificationPanel.add(mainPanel, "mainPanel");
    updateTable();
    layout.show(clarificationPanel, "mainPanel");
  }
 public void updateLocale() {
   origin = I18N.getLocaleString("MAIN_ALL");
   mcVersion = I18N.getLocaleString("MAIN_ALL");
   avaliability = I18N.getLocaleString("MAIN_ALL");
   filter.setText(I18N.getLocaleString("FILTER_SETTINGS"));
   updateFilterText();
   editModPack.setText(I18N.getLocaleString("MODS_EDIT_PACK"));
   if (I18N.currentLocale == I18N.Locale.deDE) {
     editModPack.setBounds(290, 5, 120, 25);
     typeLbl.setBounds(115, 5, 165, 25);
   } else {
     editModPack.setBounds(300, 5, 110, 25);
     typeLbl.setBounds(115, 5, 175, 25);
   }
 }
Example #21
0
  private void jbInit() throws Exception {
    // this.setResizable(false);
    this.setSize(ancho, alto);
    this.setLocation(0, 0);

    // this.setUndecorated(true);
    // this.getContentPane().setLayout(null);

    // limites de componentes
    labelFondo.setBounds(
        new Rectangle((int) (ancho / 5), 2 * (alto / 6), (int) (ancho / 1.5), alto / 4));
    botonCancelar.setBounds(
        new Rectangle(
            (int) (2.9 * (ancho / 5)), (int) (2 * (alto / 4)), (int) (ancho / 10.2), alto / 25));
    botonCancelar.setBorder(null);
    // botonAceptar.setBounds(new Rectangle(0, 0, 100, 30));
    botonAceptar.setBounds(
        new Rectangle(
            (int) (2.15 * (ancho / 5)), (int) (2 * (alto / 4)), (int) (ancho / 10.2), alto / 25));
    botonAceptar.setBorder(null);
    textNombre.setFont(new java.awt.Font("Serif", 3, 15));
    textNombre.setBounds(
        new Rectangle((int) (2.5 * (ancho / 5)), (int) (1.5 * (alto / 4)), ancho / 5, alto / 25));
    textNombre.addKeyListener(new PanelNick_textNombre_keyAdapter(this));

    textContra.setFont(new java.awt.Font("Serif", 3, 15));
    textContra.setBounds(
        new Rectangle(
            (int) (2.9 * (ancho / 5)), (int) (1.65 * (alto / 4)) + 20, ancho / 8, alto / 25));

    // imagenes de componentes
    labelFondo.setIcon(new ImageIcon("../imagenes/introduceNick.jpg"));
    botonCancelar.setIcon(new ImageIcon("../imagenes/botoncancelar.jpg"));
    botonCancelar.addMouseListener(new PanelNick_botonCancelar_mouseAdapter(this));
    botonAceptar.setIcon(new ImageIcon("../imagenes/botonaceptar.jpg"));
    botonAceptar.addMouseListener(new PanelNick_botonAceptar_mouseAdapter(this));

    // agregar componentes al panel
    this.add(textContra, null);
    this.add(botonCancelar, null);
    this.add(botonAceptar, null);
    this.add(textNombre, null);
    this.add(labelFondo, null);

    // acciones de botones
    botonAceptar.addActionListener(new PanelNick_botonAceptar_actionAdapter(this));
    botonCancelar.addActionListener(new PanelNick_botonCancelar_actionAdapter(this));
  }
  /*Aqui viene lo interesante*/
  public void
      Interfaz_Trabajador() // metodo que lo que hace es poner los botones y demas cosas de la GUI
                            // para ingresar Trabajadores
      {
    this.setLayout(
        null); // me permite poner donde yo quiera los botones ya que el layout no es el por defecto

    trab = new JLabel("Nombre del Trabajador");
    boton1 = new JButton("Ingresar trabajador");
    user = new JTextField(null); // campo donde se ingresa el nombre del trabajador
    id1 = new JTextField(); // campo para ingresar el id
    list = new JComboBox /*<String>*/(); // lista de trabajadores ingresados que se pueden usar
    ID = new JLabel("Numero de Identificaci�n");
    ventas = new JButton("Ingresar");
    informe = new JButton("Informe de ventas");

    trab.setBounds(
        5, 10, 130,
        9); /*localizacion del objeto. X,Y,H,W. X es la posicion en X, Y es lo mismo pero en Y.
            H y W son la altura y ancho del boton respectivamante*/
    this.add(trab); // es agregado a la ventana

    user.setBounds(138, 5, 130, 20);
    this.add(user);

    ID.setBounds(5, 40, 145, 9);
    this.add(ID);

    id1.setBounds(165, 35, 80, 20);
    this.add(id1);

    boton1.setBounds(55, 60, 150, 20);
    boton1.addActionListener(
        this); // el boton recibe la propiedad de actionListener, se le pone el daemon y si es
               // cliceado, se mandara al metodo
    this.add(boton1);

    list.setBounds(55, 100, 150, 50);
    this.add(list);

    ventas.setBounds(55, 170, 150, 20);
    ventas.addActionListener(this);
    this.add(ventas);

    informe.setBounds(55, 200, 150, 20);
    informe.addActionListener(this); // si es cliceado, se mandara al metodo
    this.add(informe);
  }
Example #23
0
  public void newframe() {
    JFrame frame = new JFrame("Cab Service ");
    frame.setSize(800, 600);

    frame.setVisible(true);
    // frame.setBackground(Color.CYAN);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JButton jb = new JButton("Set Name of Places ");
    jb.setBounds(100, 100, 20, 50);

    JPanel jp = new JPanel();
    jp.setBackground(Color.gray);
    jp.add(jb);
    frame.add(jp);
    JPanel jp1 = new JPanel();
    jp1.setBackground(Color.gray);
    frame.add(jp1);

    frame.add(jp);
    jb.addActionListener(
        new ActionListener() {

          public void actionPerformed(ActionEvent e) {
            try {
              CreateFrame();

            } catch (IOException ex) {
              Logger.getLogger(SetMap.class.getName()).log(Level.SEVERE, null, ex);
            }
          }
        });
  }
 public void setBounds(int x, int y, int width, int height) {
   if (d != null) {
     if (width < d.width) width = d.width;
     if (height < d.height) height = d.height;
   }
   super.setBounds(x, y, width, height);
 }
Example #25
0
  public About() {
    cl = ClassLoader.getSystemClassLoader();

    // ----------------------------------------CENTER--------------------------------//
    imgAbout = new ImageIcon(cl.getResource("om.png"));

    lblAbout = new JLabel(imgAbout);

    lblAbout.setBounds(0, 0, 450, 263);

    JPanel pnlCenter = new JPanel();
    pnlCenter.setLayout(null);
    pnlCenter.add(lblAbout);

    btnOk = new JButton(new ImageIcon(cl.getResource("ok.png")));
    btnOk.setBounds(390, 215, 40, 30);
    pnlCenter.add(btnOk);
    btnOk.addActionListener(this);

    // -----------------------------------CONTAINER----------------------------------//
    Container c = getContentPane();
    c.setLayout(new BorderLayout());
    c.add(pnlCenter, BorderLayout.CENTER);
    setSize(450, 280);
    setVisible(true);
    setResizable(false);
    setLocation(580, 280);
    // setDefaultCloseOperation(EXIT_ON_CLOSE);

  }
 private void init() throws Exception {
   this.setTitle("RasterShield Symbols");
   this.getContentPane().setLayout(null);
   treeToc1.setMap(map1);
   treeToc1.setBounds(new Rectangle(0, 52, 119, 309));
   zoomPanToolBar1.setMap(map1);
   zoomPanToolBar1.setBounds(new Rectangle(200, 5, 244, 43));
   map1.setBounds(new Rectangle(122, 51, 454, 309));
   jButton1.setBounds(new Rectangle(4, 2, 155, 48));
   jButton1.setText("Create Symbols");
   jButton1.addActionListener(new Frame1_jButton1_actionAdapter(this));
   layer1.setDataset(
       "com.esri.mo2.src.file.FileSystemConnection!C:/ESRI/MOJ20/Samples/Data/USA/states.shp!");
   layer1.setBounds(new Rectangle(125, 91, 32, 32));
   layer2.setDataset(
       "com.esri.mo2.src.file.FileSystemConnection!C:/ESRI/MOJ20/Samples/Data/USA/ushigh.shp!");
   layer2.setBounds(new Rectangle(261, 153, 32, 32));
   layer3.setDataset(
       "com.esri.mo2.src.file.FileSystemConnection!C:/ESRI/MOJ20/Samples/Data/USA/capitals.shp!");
   layer3.setBounds(new Rectangle(274, 93, 32, 32));
   this.getContentPane().add(treeToc1, null);
   this.getContentPane().add(map1, null);
   this.getContentPane().add(zoomPanToolBar1, null);
   this.setSize(new Dimension(580, 363));
   map1.add(layer1, null);
   this.getContentPane().add(jButton1, null);
   map1.add(layer2, null);
   map1.add(layer3, null);
   this.setDefaultCloseOperation(EXIT_ON_CLOSE);
 }
    BusinessPane() {
      setLayout(null);
      add(info_label);
      info_label.setBounds(10, 10, 300, 20);
      info_label.setFont(new Font("TimesRoman", Font.BOLD, 12));
      add(info_scroll);
      info_scroll.setBounds(5, 35, 615, 400);
      info_name.add(columnName[0]);
      info_name.add(columnName[1]);
      info_name.add(columnName[2]);
      info_name.add(columnName[3]);
      DefaultTableModel info_model = new DefaultTableModel(info_data, info_name);
      info_table.setModel(info_model);
      info_table.getColumnModel().getColumn(0).setWidth(25);
      info_table.addMouseListener(
          new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
              if (e.getClickCount() == 1) { // click to trigger the event
                // show_selected();
                // System.out.print(table_selected(0));
              }
            }
          });

      add(B_refresh);
      B_refresh.setMargin(new java.awt.Insets(1, 1, 1, 1));
      B_refresh.setBounds(530, 440, 90, 25);
      B_refresh.addActionListener(
          new ActionListener() {
            public void actionPerformed(ActionEvent event) {
              update_table();
            }
          });
    }
Example #28
0
  /** Constructor for objects of class Cart_Add */
  public Cart_Add(int itemID) {
    this.setLayout(null);
    this.setMaximumSize(new Dimension(1400, 50));
    product = invAccess.GetProductInfo(itemID);
    /** Create the DAO here */
    name = new JLabel(product.getName());
    discount = new JTextField();
    discount.setText(String.valueOf(product.getDiscount()));

    add.addActionListener(this);

    /** Absolute Positioning of the components */
    Insets insets = this.getInsets();
    /** The dimentsions of the JPanel */
    this.add(name);
    name.setBounds(25 + insets.left, 15 + insets.top, 250, 25);
    this.add(discount);
    discount.setBounds(125 + insets.left, 15 + insets.top, 75, 25);
    this.add(add);
    add.setBounds(250 + insets.left, 15 + insets.top, 85, 25);

    // this.setBorder (BorderFactory.createLineBorder(Color.black));
    product = invAccess.GetProductInfo(itemID);

    this.setVisible(true);
  }
  stab(ResultSet k) {
    super("PATIENT FOUND");
    String[] chd = {
      "Date",
      "Patient ID",
      "Name",
      "Gender",
      "Age",
      "Weight",
      "Address",
      "Contact No.",
      "Doctor Name",
      "Symptoms",
      "Dignosis",
      "Fee: Rs.",
      "Blood Group"
    };
    // DefaultTableModel dtm=new DefaultTableModel();
    // jt.setModel(new DefaultTableModel(arr,chd));
    jt = new JTable();
    jsp = new JScrollPane(jt);
    btn = new JButton("CLOSE");
    btn.addActionListener(this);
    int i = 0;

    try {
      while (k.next()) {

        arr[i][0] = k.getString(1);
        // System.out.println("ddddddddddddd"+arr[i][0]);
        arr[i][1] = "" + k.getInt(2);
        arr[i][2] = k.getString(3) + " " + k.getString(4) + " " + k.getString(5);
        arr[i][3] = k.getString(6);
        arr[i][4] = "" + k.getInt(7);
        arr[i][5] = k.getString(8);
        arr[i][6] = k.getString(9);
        arr[i][7] = k.getString(10);
        arr[i][8] = k.getString(11);
        arr[i][9] = k.getString(12);
        arr[i][10] = k.getString(13);
        arr[i][11] = "" + k.getInt(14);
        arr[i][12] = k.getString(15);
        arr[i][13] = k.getString(16);
        // dtm.insertRow(i,new Object[]{patient.rs.getString(1),
        // patient.rs.getInt(2),patient.rs.getString(3)+patient.rs.getString(4)+patient.rs.getString(5),patient.rs.getString(6),patient.rs.getInt(7),patient.rs.getString(8),patient.rs.getString(9),patient.rs.getString(10),patient.rs.getString(11),patient.rs.getString(12),patient.rs.getString(13),patient.rs.getInt(14)});
        i++;
      }
    } catch (Exception e12) {
      System.out.println("" + e12);
    }
    jt.setModel(new DefaultTableModel(arr, chd));
    Container con = getContentPane();
    con.setLayout(null);
    jsp.setBounds(20, 20, 1230, 600);
    btn.setBounds(685, 630, 100, 30);
    add(jsp);
    add(btn);
    setSize(1330, 800);
    setVisible(true);
  }
  /**
   * Description of the Method
   *
   * @exception Exception Description of Exception
   */
  private void jbInit() throws Exception {

    this.setLayout(null);
    this.setSize(700, 500);
    this.setLocation(0, 0);

    // limites de componentes
    labelFondo.setBounds(new Rectangle((int) (ancho / 3.5), 2 * (alto / 6), ancho / 2, alto / 4));

    botonAceptar.setBounds(
        new Rectangle(
            (int) (2.4 * (ancho / 5)), (int) (1.9 * (alto / 4)), (int) (ancho / 10.2), alto / 25));
    botonAceptar.setBorder(null);

    // imagenes de componentes
    labelFondo.setIcon(new ImageIcon(Imagen));

    botonAceptar.setIcon(new ImageIcon("../imagenes/botonaceptar.jpg"));
    botonAceptar.addMouseListener(new PanelGenerico_botonAceptar_mouseAdapter(this));

    // agregar componentes al panel

    this.add(botonAceptar, null);
    this.add(labelFondo, null);
    this.setBackground(SystemColor.menuText);

    // acciones de botones
    botonAceptar.addActionListener(new PanelGenerico_botonAceptar_actionAdapter(this));
  }