find out if text of JLabel exceeds label size

The ellipsis is added by the label’s UI delegate, typically a subclass of BasicLabelUI, as part of it’s layout and preferred size calculation. The method layoutCL() may be overridden to examine the geometry, as shown on this example. As a practical matter, I’d ignore the elision and show the full text in a tool tip.

How do I change a JFreeChart’s size

When you create your ChartPanel, you have several options that affect the result: Accept the DEFAULT_WIDTH and DEFAULT_HEIGHT: 680 x 420. Specify the preferred width and height in the constructor. Invoke setPreferredSize() explicitly if appropriate. Override getPreferredSize() to calculate the size dynamically. @Override public Dimension getPreferredSize() { // given some values of w & h … Read more