コード例 #1
0
 public static void main(String[] args) throws TwitterException {
   MainFrame panel = new MainFrame();
   jframe = panel;
   panel.setVisible(true);
   panel.setResizable(false);
   panel.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 }
コード例 #2
0
  /*
   * Karte welcomePanel laden
   */
  private void filmprogrammButtonActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_filmprogrammButtonActionPerformed
    CardLayout cL = (CardLayout) mF.getMainPanel().getLayout();
    cL.show(mF.getMainPanel(), "welcomePanel");

    setMovieDetailsEmpty();
    // CardLayout cL = (CardLayout) mainPanel.getLayout();
    // //cL.show(mainPanel,"welcomePanel");}//GEN-LAST:event_filmprogrammButtonActionPerformed
  }
コード例 #3
0
  public static void main(String[] args) {
    try {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e) {
      System.out.println("Error setting look and feel: " + e.getMessage());
    }

    MainFrame frame = new MainFrame();
    frame.setVisible(true);
  }
コード例 #4
0
 /*
  * Wenn eingeloggt und kein Gast karte addReview laden
  */
 private void filmBewertenButtonActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_filmBewertenButtonActionPerformed
   // check ob eingeloggt
   if (!mF.getIstGast()) {
     if (mF.getLoggedInKundenID().equals("")) {
       JOptionPane.showMessageDialog(
           null, "Bitte zuerst einloggen!", "Warnhinweis", JOptionPane.ERROR_MESSAGE);
     } else {
       CardLayout cL = (CardLayout) mF.getMainPanel().getLayout();
       cL.show(mF.getMainPanel(), "addReview");
     }
   } else {
     JOptionPane.showMessageDialog(
         null,
         "Als Gast kannst du keine Filme bewerten!",
         "Warnhinweis",
         JOptionPane.ERROR_MESSAGE);
   }
 } // GEN-LAST:event_filmBewertenButtonActionPerformed
コード例 #5
0
 /*
  * Wird beim Laden des Panels ausgefuehrt
  */
 private void update(java.awt.event.ComponentEvent evt) { // GEN-FIRST:event_update
   try {
     film_id = mF.getAktFilmID();
     setMovieDetailsEmpty();
     getMovieDetails();
     setMovieDetails();
     getAvgStars();
     setAvgStars();
   } catch (SQLException ex) {
     Logger.getLogger(MovieDetail.class.getName()).log(Level.SEVERE, null, ex);
   }
   updateContent();
 } // GEN-LAST:event_update
コード例 #6
0
ファイル: MainFrame.java プロジェクト: TheSpuc/workspaces
 public static void main(String[] args) {
   frame.setTitle("Mobile Phone Demo");
   frame.setSize(325, 490);
   frame.setLocation(300, 100);
   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   frame.setResizable(false);
   frame.setVisible(true);
 }
コード例 #7
0
 /** Creates new form PercentDialog */
 public PercentDialog(MainFrame mf, Percent temp, ObjectInputStream in, ObjectOutputStream out) {
   super(mf, true);
   initComponents();
   this.operationIndex = mf.getOperationIndex();
   System.out.println(operationIndex);
   this.in = in;
   this.out = out;
   if (operationIndex == 1) {
     this.setTitle("Добавление");
     button_percent_do_dialog.setText("Добавить");
   }
   if (operationIndex == 2) {
     this.setTitle("Редактирование");
     button_percent_do_dialog.setText("Редактировать");
     jLabel5.setText(temp.getPercentPK().getId() + "");
     jTextField1.setText(temp.getPercentPK().getValue() + "");
     jTextField2.setText(temp.getPercentPK().getCurrencyId() + "");
     jTextField3.setText(temp.getPercentPK().getDepositTypeId() + "");
   }
 }
コード例 #8
0
ファイル: KNNmyownParams.java プロジェクト: avasekova/adml
  public static List<KNNmyownParams> getParamsKNNmyown(
      javax.swing.JPanel percentTrainSettingsPanel,
      javax.swing.JComboBox comboBoxColName,
      javax.swing.JPanel panelSettingsKNNmyown) {
    KNNmyownParams par = new KNNmyownParams();
    // get all params for the model:
    par.setPercentTrain(
        Integer.parseInt(
            ((PercentTrainSettingsPanel) percentTrainSettingsPanel).getPercentTrain()));
    par.setColName(comboBoxColName.getSelectedItem().toString()); // data

    List<KNNmyownParams> resultList = new ArrayList<>();
    resultList.add(par);

    MainFrame.getInstance().setParamsGeneral(KNNmyownParams.class, resultList);
    ((KNNmyownSettingsPanel) panelSettingsKNNmyown)
        .setSpecificParams(KNNmyownParams.class, resultList);

    return resultList;
  }
コード例 #9
0
  /*
   * Einfacher Klick: Vorstellungsinformationen aus der Tabelle in Variablen schreiben
   * Doppelklick: Karte bookingSummary laden
   */
  private void spielzeitTableMouseClicked(
      java.awt.event.MouseEvent evt) { // GEN-FIRST:event_spielzeitTableMouseClicked

    if (evt.getClickCount() == 1) {
      int row = spielzeitTable.getSelectedRow();
      datumSelect = (String) spielzeitTable.getValueAt(row, 1);
      uhrzeitSelect = (String) spielzeitTable.getValueAt(row, 2);
      saalSelect = (String) spielzeitTable.getValueAt(row, 3);
      mF.setDatumSelect(datumSelect);
      mF.setUhrzeitSelect(uhrzeitSelect);
      mF.setSaalSelect(saalSelect);
    }
    if (evt.getClickCount() == 2) {
      if (!mF.getLoggedInKundenID().equals("")) {
        CardLayout cL = (CardLayout) mF.getMainPanel().getLayout();
        cL.show(mF.getMainPanel(), "bookingSummary");
      } else {
        JOptionPane.showMessageDialog(
            null, "Bitte zuerst einloggen!", "Warnhinweis", JOptionPane.ERROR_MESSAGE);
      }
    }
  } // GEN-LAST:event_spielzeitTableMouseClicked
コード例 #10
0
 public static void main(String[] args) {
   MainFrame frame = new MainFrame();
   frame.setVisible(true);
 }
コード例 #11
0
 /*
  * Karte showReview laden
  */
 private void bewAnsButtonActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_bewAnsButtonActionPerformed
   CardLayout cL = (CardLayout) mF.getMainPanel().getLayout();
   cL.show(mF.getMainPanel(), "showReview");
 } // GEN-LAST:event_bewAnsButtonActionPerformed