When running the swingset with kestrel-H, I noticed that when using the
BorderedPane demo, and setting the Title Position to "Below Bottom", the
title appears to be a little higher than it should be, and the bottom
border is not painted.
This bug also occurs in 1.2fcs and Cricket.
Name: apR10133 Date: 04/23/2001
Here is the small testcase:
--------------------------- bug4247606.java ---------------------------
import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
import java.awt.event.*;
public class bug4247606 extends JApplet {
JPanel p = new JPanel();
TitledBorder t;
public void init() {
JFrame fr = new JFrame("Test");
fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel pane = new JPanel();
pane.setBorder(new EmptyBorder(20,20,20,20));
pane.setLayout(new BorderLayout());
t = BorderFactory.createTitledBorder("Bordered Pane y");
t.setTitlePosition(TitledBorder.BELOW_BOTTOM);
//t.setTitleFont(new Font("Arial", Font.BOLD, 128));
p.setBorder(t);
p.setLayout(new BorderLayout());
p.setBackground(Color.green);
JButton bt = new JButton("Button");
bt.setBorder(new LineBorder(Color.red, 5));
p.add(bt);
pane.add(p);
fr.getContentPane().add(pane);
fr.setSize(300,200);
fr.setVisible(true);
System.out.println("bt: "+ bt.getBounds());
System.out.println("p: "+ p.getBounds());
}
public static void main(String[] argv) {
bug4247606 b = new bug4247606();
b.init();
}
}
###@###.###
Evaluated: yes
======================================================================