Java Code Examples for javax.swing.JTextArea.setMinimumSize()

The following are Jave code examples for showing how to use setMinimumSize() of the javax.swing.JTextArea class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: VASSAL-src   File: ImagePicker.java   Source Code and License Vote up 21 votes
public ImagePicker() {
  noImage = new JTextArea(1,10);
  noImage.setFont(FONT);
  noImage.setText("Double-click here to add new image");
  noImage.addMouseListener(this);
  noImage.setEditable(false);
  noImage.setLineWrap(true);
  noImage.setWrapStyleWord(true);
  noImage.setMinimumSize(new Dimension(15, 32));
  icon = new OpIcon();
  imageView = new JLabel(icon);
  imageView.addMouseListener(this);

  imageViewer = new JPanel(new BorderLayout());
  imageScroller = new ScrollPane(
    imageView,
    JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
    JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  imageViewer.add(imageScroller, BorderLayout.CENTER);

  select = new JComboBox(ArrayUtils.prepend(GameModule.getGameModule().getDataArchive().getImageNames(), NO_IMAGE));
  select.addItemListener(this);
  setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
  add(noImage);
  add(select);
}