setLayout(new BorderLayout());
add(desc, BorderLayout.NORTH);
- this.setSize(600, desc.getHeight() + 0);
this.setUndecorated(undecorated);
+ pack();
+ this.setSize(600, getHeight());
+
if (!undecorated) {
UiHelper.setFrameIcon(this, lib, meta);
}
}
- @Override
- public void setVisible(final boolean b) {
- super.setVisible(b);
-
- if (b) {
- int titleBarHeight = Math
- .abs(getContentPane().getHeight() - getHeight());
- this.setSize(600, desc.getHeight() + titleBarHeight);
- }
- }
-
@Override
public synchronized void addMouseListener(MouseListener l) {
super.addMouseListener(l);
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
+import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import be.nikiroo.fanfix.data.MetaData;
public class PropertiesPanel extends JPanel {
private static final long serialVersionUID = 1L;
private final int space = 10; // empty space for visual correctness
- private final int hscroll = 10; // we reserve space at the bottom for a
- // potential HScroll
+ private final int hscroll; // we reserve space at the bottom for a
+ // potential HScroll
private List<Component> listenables;
/**
boolean includeTitle) {
listenables = new ArrayList<Component>();
+ hscroll = UIManager.getInt("ScrollBar.width");
Color trans = new Color(0, 0, 0, 1);
// Image