Package javax.swing.border

Examples of javax.swing.border.LineBorder


    public CropTest() {
        factory = new MediaPlayerFactory();
        mediaPlayer = factory.newEmbeddedMediaPlayer();

        videoPane = new JPanel();
        videoPane.setBorder(new CompoundBorder(new LineBorder(Color.black, 2), new EmptyBorder(16, 16, 16, 16)));
        videoPane.setLayout(new BorderLayout());
        videoPane.setBackground(Color.white);

        videoCanvas = new Canvas();
        videoCanvas.setBackground(Color.red);
View Full Code Here


            PlayerInstance playerInstance = new PlayerInstance(player);
            players.add(playerInstance);

            JPanel playerPanel = new JPanel();
            playerPanel.setLayout(new BorderLayout());
            playerPanel.setBorder(new LineBorder(Color.white, 2));
            playerPanel.add(playerInstance.videoSurface());

            contentPane.add(playerPanel);
        }
View Full Code Here

        mediaPlayer = mediaPlayerFactory.newHeadlessMediaPlayer();
        mediaPlayer.setPlaySubItems(true); // <--- very important!

        contentPane = new JPanel();
        contentPane.setBackground(Color.black);
        contentPane.setBorder(new LineBorder(new Color(190, 190, 190)));
        contentPane.setLayout(new BorderLayout());
        contentPane.add(new ImagePane(ImagePane.Mode.FIT, getClass().getResource("drop.png"), 0.3f), BorderLayout.CENTER);
        contentPane.setTransferHandler(new MyTransferHandler());

        MyMouseAdapter mouseAdapter = new MyMouseAdapter();
View Full Code Here

        videoSurface = mediaPlayerFactory.newVideoSurface(canvas);
        mediaPlayer.setVideoSurface(videoSurface);

        contentPane = new JPanel();
        contentPane.setBackground(Color.black);
        contentPane.setBorder(new LineBorder(new Color(190, 190, 190)));
        contentPane.setLayout(new BorderLayout());
        contentPane.add(canvas, BorderLayout.CENTER);
        contentPane.setTransferHandler(new MyTransferHandler());

        MyMouseAdapter mouseAdapter = new MyMouseAdapter();
View Full Code Here

    for (int i = 0; i < 5; i++) {
      for (int j = 0; j < 5; j++) {
        ImagePanel pnl = imagePanels[i][j];
        boolean sel = i == pRow && j == pCol;
        ((JPanel) pnl.getParent()).setBorder(new LineBorder(sel ? selColor : deSelColor, sel ? 5 : 1));
      }
    }
    selRow = pRow;
    selCol = pCol;
    enableControls();
View Full Code Here

          else {
            imgPanel = new ImagePanel(img, 0, 0, img.getImageWidth());
          }
          imgPanel.setImage(img);
          imgPanel.setLocation(x, y);
          imgPanel.setBorder(new LineBorder(deselectedCellColor, borderSize));
          pnlList.add(imgPanel);

          final int pnlIdx = pnlList.size() - 1;

          imgPanel.addMouseListener(new java.awt.event.MouseAdapter() {
View Full Code Here

  protected void selectCell(int pIndex) {
    for (int i = 0; i < pnlList.size(); i++) {
      ImagePanel pnl = pnlList.get(i);
      boolean sel = (i == pIndex);
      pnl.setBorder(new LineBorder(sel ? selectedCellColor : deselectedCellColor, borderSize));
    }
    imgRootPanel.invalidate();
    imgRootPanel.validate();
    selectedPnl = pIndex;
    enableControls();
View Full Code Here

  }

  private JLabel createPredicateElement(String predicate) {
    JLabel label = new JLabel(predicate, SwingConstants.CENTER);
    label.setFont(this.parent.getFONT());
    label.setBorder(new LineBorder(Color.BLACK));

    Dimension size = new Dimension(label.getPreferredSize().width + (int) parent.PADDING, label.getPreferredSize().height + (int) parent.PADDING);
    label.setPreferredSize(size);
    label.setSize(size);
View Full Code Here

      gbc.gridx = gbc.gridy = 0;
      gbc.anchor = GridBagConstraints.NORTHWEST;
      gbc.weighty = 1.0;

      final JPanel panel = new JPanel(new GridBagLayout());
      panel.setBorder(new TitledBorder(new LineBorder(Color.BLACK),
      "Preceding Suggestions"));

      final SuggestionRowPanel rowPanel = new SuggestionRowPanel(
          this.queryResult_preceding, this.varSO, this.varPred);
      rowPanel.setLayout(null);
View Full Code Here

      gbc.gridx = gbc.gridy = 0;
      gbc.anchor = GridBagConstraints.NORTHWEST;
      gbc.weighty = 1.0;

      final JPanel panel = new JPanel(new GridBagLayout());
      panel.setBorder(new TitledBorder(new LineBorder(Color.BLACK),
      "Succeeding Suggestions"));

      final SuggestionRowPanel rowPanel = new SuggestionRowPanel(
          this.queryResult_succeeding, this.varSO, this.varPred);
      rowPanel.setLayout(null);
View Full Code Here

TOP

Related Classes of javax.swing.border.LineBorder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.