Exemple #1
2
  /** Inicializace základních komponent okna */
  private void init() {

    krokLabel = new JLabel("Synchronizace s web aplikací");
    Font pismo = new Font("Arial", Font.BOLD, 14);
    krokLabel.setFont(pismo);
    NacitaciOkno.add(krokLabel);
    krokLabel.setBounds(90, 10, 250, 20);

    startButton = new JButton("Načíst");
    startButton.setActionCommand("start");
    startButton.setBounds(250, 110, 120, 25);
    startButton.addActionListener(new Start());

    progressBar = new JProgressBar(0, 100);
    progressBar.setBounds(20, 60, 350, 25);
    progressBar.setValue(0);

    progressBar.setStringPainted(true);

    taskOutput = new JTextArea(5, 20);
    taskOutput.setMargin(new Insets(5, 5, 5, 5));
    taskOutput.setEditable(false);

    NacitaciOkno.add(startButton);
    NacitaciOkno.add(progressBar);

    NacitaciOkno.setVisible(true);

    vybratButton = new JButton("Otevřít");
    NacitaciOkno.add(vybratButton);
    vybratButton.setBounds(20, 110, 120, 25);
    vybratButton.addActionListener(new Zpet());
  }
Exemple #2
0
 private void initHeader() {
   NacitaciOkno = new JFrame();
   NacitaciOkno.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   NacitaciOkno.setTitle("Synchronizace dat");
   NacitaciOkno.setLocation(400, 350);
   NacitaciOkno.setSize(400, 200);
   NacitaciOkno.setLayout(null);
 }
Exemple #3
0
 /**
  * Zajišťuje zobrazení nebo skrytí okna.
  *
  * @param viditelnost
  */
 public void setVisible(boolean viditelnost) {
   NacitaciOkno.setVisible(viditelnost);
 }