Back to index

wims  3.65+svn20090927
AppletMenu.java
Go to the documentation of this file.
00001 /*
00002     WIMSchem Elements: Chemistry molecular diagram drawing tool.
00003     
00004     (c) 2005 Dr. Alex M. Clark
00005     
00006     Released as GNUware, under the Gnu Public License (GPL)
00007     
00008     See www.gnu.org for details.
00009 */
00010 
00011 package WIMSchem;
00012 
00013 import javax.swing.*;
00014 import javax.swing.border.*;
00015 import java.awt.*;
00016 import java.awt.event.*;
00017 import java.awt.font.*;
00018 import java.io.*;
00019 import java.util.*;
00020 
00021 // Subclassed version of JMenu which draws itself a bit differently
00022 
00023 public class AppletMenu extends JMenu
00024 {
00025     public AppletMenu(String Txt)
00026     {
00027        super(Txt);
00028        setBorder(new SoftBevelBorder(BevelBorder.RAISED));
00029     }
00030     
00031     public Dimension getPreferredSize()
00032     {
00033        Dimension sz=super.getPreferredSize();
00034        sz.width += 8;
00035        sz.height += 8;
00036        return sz;
00037     }
00038 }