Re: Two problems with too
To: comp.lang.java.gui
The problems can be seen in this very simple application. Can someone
please run it on their Linux environment and report back as to whether they
also experience the results I have outlined.
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.EventQueue;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JToolBar;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
public class GTKTest extends JFrame
{
public GTKTest()
{
try
{
UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
}
catch (InstantiationException ie)
{
}
catch (IllegalAccessException iae)
{
}
catch (ClassNotFoundException cnfe)
{
}
catch (UnsupportedLookAndFeelException ulafe)
{
}
setLayout(new BorderLayout());
JButton b1 = new JButton("B1");
JButton b2 = new JButton("B2");
JButton b3 = new JButton("B3");
b3.setEnabled(false);
JButton b4 = new JButton("B4");
JButton b5 = new JButton("B5");
JToolBar toolBar = new JToolBar();
toolBar.add(b1);
toolBar.add(b2);
toolBar.add(b3);
toolBar.add(b4);
toolBar.add(b5);
add(toolBar, BorderLayout.NORTH);
pack();
setPreferredSize(new Dimension(500, 300));
setMinimumSize(new Dimension(500, 300));
}
public static void main(String[] args)
{
EventQueue.invokeLater(new Runnable()
{
public void run()
{
new GTKTest().setVisible(true);
}
});
}
}
It simply displays a tool bar and you should be able to see how ridiculously
wide the buttons are and that the disabled button has a border whereas the
enabled buttons do not. Surely it's not meant to be like this?
--
And loving it,
qu0ll
______________________________________________
qu0llSixFour@gmail.com
(Replace the "SixFour" with numbers to email)
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24