コード例 #1
0
 private JPanel kibicPanel() {
   FormLayout layout3 = new FormLayout("730", "15px, 485px");
   kibicPanel = new JPanel(layout3);
   // kibicPanel = new FormDebugPanel(layout3);
   CellConstraints cc = new CellConstraints();
   JLabel labell = new JLabel("Wyloguj");
   labell.addMouseListener(
       new MouseAdapter() {
         public void mousePressed(MouseEvent me) {
           CardLayout c1 = (CardLayout) (utworzPanel.getLayout());
           c1.show(utworzPanel, "card1");
           tx1.setText("");
           tx2.setText("");
         }
       });
   Color c = new Color(153, 180, 209);
   kibicPanel.setBackground(c);
   tabbedPane = new JTabbedPane(JTabbedPane.LEFT);
   tabbedPane.setBorder(null);
   tabbedPane.addTab("Spotkania", new ImageIcon("images/spotkania.png"), new Spotkania());
   Font font = new Font("Arial", Font.BOLD, 15);
   tabbedPane.setFont(font);
   tabbedPane.addTab("Król strzelców", new ImageIcon("images/krol.png"), new KrolStrzelcow());
   tabbedPane.addTab("Ranking drużyn", new ImageIcon("images/ranking.png"), new RankingDruzyn());
   // tabbedPane.addTab("")
   tabbedPane.setBackground(c);
   kibicPanel.add(tabbedPane, cc.xy(1, 2));
   kibicPanel.add(labell, cc.xy(1, 1, CellConstraints.RIGHT, CellConstraints.TOP));
   return kibicPanel;
 }
コード例 #2
0
  private JPanel pracownikPanel() {
    FormLayout layout3 = new FormLayout("734", "15px, 485px");

    pracownikPanel = new JPanel(layout3);
    // pracownikPanel= new FormDebugPanel(layout3);
    CellConstraints cc = new CellConstraints();
    JLabel labell = new JLabel("Wyloguj");
    labell.addMouseListener(
        new MouseAdapter() {
          public void mousePressed(MouseEvent me) {
            CardLayout c1 = (CardLayout) (utworzPanel.getLayout());
            c1.show(utworzPanel, "card1");
            tx1.setText("");
            tx2.setText("");
          }
        });

    Color c = new Color(153, 180, 209);
    pracownikPanel.setBackground(c);
    tabbedPane2 = new JTabbedPane(JTabbedPane.LEFT);
    tabbedPane2.setBorder(null);
    tabbedPane2.addTab("Raport", new ImageIcon("images/spotkania.png"), new Raport());
    Font font = new Font("Arial", Font.BOLD, 15);
    tabbedPane2.setFont(font);

    tabbedPane2.setBackground(c);

    pracownikPanel.add(tabbedPane2, cc.xy(1, 2));
    pracownikPanel.add(labell, cc.xy(1, 1, CellConstraints.RIGHT, CellConstraints.TOP));
    return pracownikPanel;
  }
コード例 #3
0
ファイル: InterpreterFrame.java プロジェクト: DavePearce/jkit
 private JTabbedPane buildProblemsConsole() {
   // build the problems/console editor
   JTabbedPane tp = new JTabbedPane();
   ImageIcon consoleIcon = makeImageIcon("stock_print-layout-16.png");
   tp.addTab("Problems", addScrollers(problemsView));
   tp.addTab("Console", consoleIcon, addScrollers(consoleView));
   // empty border to give padding around tab pane
   tp.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
   return tp;
 }
コード例 #4
0
ファイル: DialogAbout.java プロジェクト: zukov/Jpicedt
  /** Construct a new "about…" dialog */
  public DialogAbout(MDIManager mdimgr) {

    buttonOk = new JButton(localize("button.OK"));
    buttonOk.addActionListener(this);

    JPanel buttonPanel = new JPanel(new FlowLayout(), false);
    buttonPanel.add(buttonOk);

    JPanel logoPanel = new JPanel(new FlowLayout(), false);
    logoPanel.setBorder(new EmptyBorder(10, 10, 10, 10));
    logoPanel.add(PEToolKit.createJLabel("Frankenstein"));

    JPanel infoPanel = new JPanel(new GridLayout(9, 1, 5, 5), true);
    infoPanel.setBorder(new EmptyBorder(10, 60, 10, 10));
    infoPanel.add(
        new JLabel("jPicEdt " + Version.getVersion() + " Built " + Version.getBuildDate()));
    infoPanel.add(new JLabel(localize("about.APictureEditorFor")));
    final String[] addressLines = {
      "(c) Sylvain Reynal",
      "É.N.S.É.A. - Dept. of Physics",
      "6, avenue du Ponceau",
      "F-95014 CERGY Cedex",
      "Fax: +33 (0) 130 736 667",
      "*****@*****.**",
      "http://www.jpicedt.org"
    };
    for (String addressLine : addressLines) infoPanel.add(new JLabel(addressLine));

    JTabbedPane caveatPanel = new JTabbedPane();
    String[] tabKeys = {"license.lines", "license.thirdparty.lines"};
    for (String tabKey : tabKeys) {
      JEditorPane caveatTA = new JEditorPane();
      caveatTA.setContentType("text/html; charset=" + localize(tabKey + ".encoding"));
      caveatTA.setEditable(false);
      caveatTA.setPreferredSize(new Dimension(485, 300));
      JScrollPane scrollCaveat = new JScrollPane(caveatTA);
      caveatTA.setText(localize(tabKey));
      caveatPanel.addTab(localize(tabKey + ".tabname"), null, scrollCaveat, null);
    }

    caveatPanel.setBorder(BorderFactory.createEtchedBorder());

    JPanel upperPanel = new JPanel(new BorderLayout(), false);
    upperPanel.add(logoPanel, BorderLayout.WEST);
    upperPanel.add(infoPanel, BorderLayout.CENTER);
    upperPanel.add(caveatPanel, BorderLayout.SOUTH);
    upperPanel.setBorder(BorderFactory.createEtchedBorder());

    JPanel contentPane = new JPanel(new BorderLayout(5, 5));
    contentPane.add(upperPanel, BorderLayout.NORTH);
    contentPane.add(buttonPanel, BorderLayout.SOUTH);

    String title = localize("about.AboutPicEdt") + " " + Version.getVersion();
    boolean modal = true;
    frame = mdimgr.createDialog(title, modal, contentPane);
    frame.setResizable(true);
    frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

    Dimension dlgSize = frame.getPreferredSize();
    frame.setSize(dlgSize);

    // this.pack();
    frame.setVisible(true);
  }