Announcement

Collapse
No announcement yet.

JComboBox auf eine gewisse anzahl spalten begrentzen

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • JComboBox auf eine gewisse anzahl spalten begrentzen

    Hallo,
    eine JCombobox klappt bei mir immer ewig uf, wie schaffe ich es den inhalt auf 5 zeilen zu begrenzen, und dafür dann einen Scrollbalken einzubleneden??

    Tobias

  • #2
    Hallo Tobias,<br>
    versuch mal: myComboBox.setMaximumRowCount(5);
    <p>
    Klau

    Comment


    • #3
      Hallo,

      ich will ja nicht unhöflich sein, aber ein bisschen lesen in der Doku
      ist doch wohl nicht zuviel verlangt!?!?

      public void setMaximumRowCount(int count)
      Sets the maximum number of rows the JComboBox displays. If the number of objects in the model is greater than count, the combo box uses a scrollbar.
      Parameters:
      count - an integer specifying the maximum number of items to display in the list before using a scrollbar

      Thoma

      Comment

      Working...
      X