1

I'm using a jTable in a JDialog, when I need to use the scrollbars it drags the JDialgo instead of the rows. I'm using NetBeans form design.

P.D. Of course ny JTable is inside a JScrollPane.

Window before dragging the scrollpane

After dragging

1 Answers1

2

Edited: On Mac OS X, this is a feature when you specify setUndecorated(true), as shown in this example. Use setUndecorated(false) instead. As long as you use a layout manager and pack() the dialog, the JTable should adopt a reasonable size. You can use setPreferredScrollableViewportSize(), mentioned here, if required. See also these caveats.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045
  • 1
    Oops, I think the effect is due to `setUndecorated(true)`, updated above. I should have looked at your screenshots more carefully; I apologize for the error. If you still see a problem, please edit your question to include an [sscce](http://sscce.org/) that exhibits the problem you describe. – trashgod Sep 22 '12 at 21:10