44 lines
1.2 KiB
Java
44 lines
1.2 KiB
Java
|
|
import java.awt.*;
|
|
import javax.swing.*;
|
|
|
|
public class grey
|
|
{
|
|
public static void main(String[] args)
|
|
{
|
|
JDialog jd = new JDialog();
|
|
|
|
jd.getContentPane().setLayout(new FlowLayout());
|
|
newButton(jd, "buttons\\16\\del.gif");
|
|
newButton(jd, "buttons\\16\\frefr.gif");
|
|
newButton(jd, "buttons\\16\\info.gif");
|
|
newButton(jd, "buttons\\16\\lrefr.gif");
|
|
newButton(jd, "buttons\\16\\mkdir.gif");
|
|
newButton(jd, "buttons\\16\\rename.gif");
|
|
newButton(jd, "buttons\\16\\rmdir.gif");
|
|
newButton(jd, "buttons\\16\\view.gif");
|
|
/*
|
|
newButton(jd, "buttons\\256\\del.gif");
|
|
newButton(jd, "buttons\\256\\frefr.gif");
|
|
newButton(jd, "buttons\\256\\info.gif");
|
|
newButton(jd, "buttons\\256\\lrefr.gif");
|
|
newButton(jd, "buttons\\256\\mkdir.gif");
|
|
newButton(jd, "buttons\\256\\rename.gif");
|
|
newButton(jd, "buttons\\256\\rmdir.gif");
|
|
newButton(jd, "buttons\\256\\view.gif");
|
|
*/
|
|
jd.pack();
|
|
jd.show();
|
|
}
|
|
|
|
private static void newButton(JDialog jd, String b)
|
|
{
|
|
ImageIcon iicon = new ImageIcon(b);
|
|
JButton jb = new JButton();
|
|
jb.setIcon(iicon);
|
|
jb.setEnabled(false);
|
|
jb.setBackground(new Color(204, 204, 204));
|
|
jd.getContentPane().add(jb, BorderLayout.CENTER);
|
|
}
|
|
}
|