JButton border not visible

Hi
I have an swing app which works fine on a 1024x768 resolution, ie the GUI components are displayed okay. I tried to run the app on a screen with high resolution 1280*1024 and the button border is not visible. It just shows the text and the image icon.
Any idea/help is appreciated.

Note that setting the border color to the background color worked, but left a nasty shadow.
I solved this by reskinning the control, and removing the border and shadow.
The bug is still definitely real.
This came up because of a need to roll my own radio buttons that support multiple lines, and thus, require wrapping.

Similar Messages

  • Jbuttons are not visible

    Hi,
    Please Help.
    I have defined a Jpanel which contains some buttons. This panel is initially collapsed and there is an expand button, clicking on which will expand the panel and buttons should be visible.
    Sometimes the buttons are not visible after expanding the panel, or only some of them are visible.
    This problem is not reproducible everytime.
    For expanding and collapsing the Jpanel i am chaging the bound settings of the panel by using function
    setBounds().
    Can someone please help me with this issue?
    Thanks

    My intention was not to annoy anyone by posting my problem at two different forums. Sorry if i did that. I just wanted to get more opinions on this problem.
    The suggestions i received on this one was mainly to use 'Layout Manager'. I tried using that but was running into other issues. If i have to use Layout Manager then i guess i have to change the design of the full window. I cannot use layout manger on just the part of the window which is giving problem (please let me know i am wrong). Also, I am new to Swings and not much familiar with 'Layout Manager'.
    Is there a way to resolve this problem without using layout manager. This is not reproducible. It happens only in production.
    I am pasting my code below -
    I have modified the code as per the suggestions received from the forum to include repaint() and revalidate() methods.
    The part i added is in bold. Please let me know what changes i should do to improve this and resolve the issue.
    public static void main(String[] args) {
              initGUI();          
              frame = new JFrame();          
              frame.getContentPane().add(this);          
              frame.setBackground(LIGHT_BLUE);          
              frame.setTitle("ABC");
              logoImage = imgSPIcon.getImage();
              frame.setIconImage(logoImage);          
              frame.setSize(286,298);
              frame.setResizable(false);          
              frame.setVisible(false);  
                    frame.getContentPane().validate();  
                    frame.validate();     
    private void initGUI() {
              try {          
                   this.setSize(294, 280);
                   this.setBackground(LIGHT_BLUE);
                   this.setName("ABC");
                   getContentPane().setBackground(this.LIGHT_BLUE);
                   getContentPane().setLayout(null);               
                   this.setFocusable(false);
                   //collapse button used for expanding and collapsing the dial panel
                             m_btnCollapse = new JButton();
                             BottamPanel.add(m_btnCollapse);
                             m_btnCollapse.setBounds(163, 0, 112, 21);
                             m_btnCollapse.setIcon(imgExpandDialpad);
                             m_btnCollapse.setBorder(BorderFactory.createCompoundBorder(null, null));
                             m_btnCollapse.setBackground(new java.awt.Color(177, 201, 224));
                             m_btnCollapse.setContentAreaFilled(false);
                   //Dial panel
                        DialPanel = new JPanel();                    
                        //getContentPane().add(DialPanel);                    
                        DialPanel.setBounds(0, 251, 280, 0);                    
                        DialPanel.setLayout(null);
                        DialPanel.setBackground(bkColor);                    
                             m_btn1 = new JButton();                         
                             m_btn1.setIcon(imgDPOne);
                             m_btn1.setContentAreaFilled(false);
                             m_btn1.setBounds(79, 0, 35, 28);
                             m_btn1.setBorderPainted(false);
                             DialPanel.add(m_btn1);
                             m_btn2 = new JButton();                         
                             m_btn2.setBounds(120, 0, 35, 28);
                             m_btn2.setIcon(imgDPTwo);
                             m_btn2.setContentAreaFilled(false);
                             m_btn2.setBorderPainted(false);
                             DialPanel.add(m_btn2);
                             m_btn3 = new JButton();                         
                             m_btn3.setBounds(161, 0, 35, 28);
                             m_btn3.setIcon(imgDPThree);
                             m_btn3.setContentAreaFilled(false);
                             m_btn3.setBorderPainted(false);
                             DialPanel.add(m_btn3);
                        //includes more such buttons
                                    DialPanel.validate();
                        getContentPane().add(DialPanel);               
                   //adding mouse listner for the collapse button
                   JavaPhoneMouse aJavaPhoneMouse = new JavaPhoneMouse();
                   m_btnCollapse.addMouseListener(aJavaPhoneMouse);
         //mouse listner.
         class JavaPhoneMouse extends java.awt.event.MouseAdapter {
              public void mouseClicked(java.awt.event.MouseEvent event) {
                   Object object = event.getSource();
                   if (object == m_btnCollapse)
                        m_btnCollapse_MouseClicked(event);
         //On expanding the dial panel the dial panel is expanded(the size changes) but the buttons are invisible. 
         void m_btnCollapse_MouseClicked(java.awt.event.MouseEvent event) {
              //if the dial pad is in expanded form it will collapse else it will be expanded.
              if (isDialPadCollapsed == false) {               
                   DialPanel.setBounds(0, 251, 280, 0);
                   DialPanel.revalidate();
                   DialPanel.repaint();                              
                   BottamPanel.setBounds(0, 251, 280, 21);
                   m_btnCollapse.setIcon(imgExpandDialpad);               
                   this.setSize(280, 277);               
                   frame.setResizable(true);
                   frame.setSize(286, 298);
                   frame.setResizable(false);
                            frame.getContentPane().repaint();
                   frame.repaint();                              
                   isDialPadCollapsed = true;
              } else {               
                   this.setSize(280, 408);               
                   frame.setResizable(true);
                   frame.setSize(286, 430);
                   frame.setResizable(false);               
                   BottamPanel.setBounds(0, 384, 280, 21);               
                   DialPanel.setBounds(0, 251, 280, 133);     
                            DialPanel.revalidate();
                   DialPanel.repaint();
                   frame.getContentPane().repaint();
                   frame.repaint();          
                   m_btnCollapse.setIcon(imgCollDialpad);
                   isDialPadCollapsed = false;
    {code}
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • TextArea border not visible erases all text if heightInLines is NaN

    I am using a TextArea to take advantage of the flexible sizing.
    textArea.heightInLines = NaN;
    textArea.widthInChars = Nan:
    It is also important that the border be suppressed.
    textArea.setStyle("borderVisible", false);
    Unfortunately, while this correctly sizes the textArea, it also wipes out the text!
    This is true if either or both of the flexible sizing options are in effect.
    It did not help to create the textArea as an mxml component instead of doing it in actionscript.
    Is this a bug?  (sure feels like a bug)
    Can anyone suggest a workaround?
    I'm using Flash Builder 4.5.  If there are recent updates or patches I don't know about them, but would happy to apply them.

    Note that setting the border color to the background color worked, but left a nasty shadow.
    I solved this by reskinning the control, and removing the border and shadow.
    The bug is still definitely real.
    This came up because of a need to roll my own radio buttons that support multiple lines, and thus, require wrapping.

  • Semitransparent Panel & jComponent not visible

    Problem:jButton is not visible & CockPitPanel should be semitransparent import java.awt.Color;
    import java.awt.GraphicsEnvironment;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.JFrame;
    public class RBStrategy implements Runnable
         private JFrame frame;
         static boolean onlyScreen = true;
         static Screen screen;
         static AircraftCockPit aircraftCockPit;
         public RBStrategy(JFrame frame, Screen screen)
              this.frame = frame;
              this.screen = screen;
         public static void main(String[] args)
              JFrame frame = new JFrame();
              screen = new Screen();
              frame.setUndecorated(true);
              frame.getContentPane().add(screen);
              GraphicsEnvironment.getLocalGraphicsEnvironment().
                   getDefaultScreenDevice().setFullScreenWindow(frame);
              screen.setLayout(null);
              aircraftCockPit = new AircraftCockPit(screen);
              new RBStrategy(frame, screen).run();
         public void run()
              do
                   String output;
                   try
                        Thread.sleep(1000);
                   catch (InterruptedException ie)
                        ie.printStackTrace(System.err);
              while (true);
    class Screen
         extends JPanel
         implements
              Runnable {
                   boolean progressing = true;
                   Thread t;
                   Screen()     {
                        this.add(new JButton("ButtonScreen"));
                        this.setBackground(Color.BLACK);
                        this.start();
                 public void stop()     {
                      progressing = false;
                      t.stop();
                 public void start()     {
                      progressing = true;
                      t = new Thread(this);
                      t.start();
                 protected void paintComponent(Graphics g)     {
                           super.paintComponent(g);
                           g.setColor(Color.red);
                           for(int i=0;i<this.getHeight();i=i+10)     {
                                     g.drawLine(0,i,this.getWidth(),i);
                   public void run()     {
                        try     {
                             while(progressing)     {
                                  this.repaint();
                                  Thread.sleep(1);
                        }catch     (InterruptedException e)     {
                             System.out.println("Interrupted");
    class AircraftCockPit
         extends JPanel
         implements  Runnable {
              boolean progressing=true;     
              Thread t;
              JButton jButton;
              Screen screen;
              AircraftCockPit(Screen s)     {
                   screen = s;
                   jButton=new JButton("ButtonCockPit");
                   jButton.setBounds(30,30,40,40);
                   this.setBackground(Color.GRAY);
                   this.setBounds(s.getWidth()*3/4,s.getHeight()>>2,s.getWidth()>>2,s.getHeight()*9/20);
                   s.add(this);
                   this.start();
              public void stop()     {
                   progressing = false;
                   t.stop();
              public void start()     {
                   progressing = true;
                   t = new Thread(this);
                   t.start();
              protected void paintComponent(Graphics g)     {
                        super.paintComponent(g);
              public void run()     {
                   try     {
                        while(progressing)     {
                             this.repaint();
                             Thread.sleep(2);
                   }catch     (InterruptedException e)     {
                        System.out.println("Interrupted");
    }

    As I suggested in your last posting, the size of the Screen panel is (0, 0). Since the size of the AircraftCockpit is based on the size of the Screen it is also (0, 0). So there is nothing to paint.
    Did you add a few System.out.println(...) statements to verify this?

  • JComboBox - Bottom border is not visible for the first time

    JComboBox - Bottom border is not visible for the first time i click on the arrow to drop the list down.
    This happens because the list when dropped down goes out of the frame.
    If have the increased the size of the Frame then i am able to see it,but i dont want to do this.
    I am using jdk1.3.1_02.
    Any Help would be great.
    Please find the code below.
    Thanks,
    Sridhar.
    //file: Lister.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Lister {
        public static void main(String[] args) {
            JFrame frame = new JFrame("Lister v1.0");
            // create a combo box
            String [] items = { "uno", "due", "tre", "quattro", "cinque",
            "sei", "sette", "otto", "nove", "deici",
            "undici", "dodici" };
            JComboBox comboBox = new JComboBox(items);
            comboBox.setEditable(true);
            // put the controls the content pane
            Container c = frame.getContentPane( );
            JPanel comboPanel = new JPanel( );
            comboPanel.add(comboBox);
            c.add(comboPanel, BorderLayout.NORTH);
            c.setBackground(Color.white);
            comboBox.setBackground(Color.white);
            comboPanel.setBackground(Color.white);
            frame.setBackground(Color.white);
            frame.setResizable(false);
            frame.setSize(200, 200);
            frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
            frame.setVisible(true);
    }

    Hello,
    try this:JPanel comboPanel = new JPanel(new BorderLayout());Regards,
    Tim

  • Drop down list(JComboBox) - Bottom border is not visible for the first time

    Drop down list(Combo-box) JComboBox - Bottom border is not visible for the first time i click on the arrow to drop the list down.
    I am using jdk1.3.1_02.
    Did any one face this issue.
    Please let me know.
    Thanks,
    Sridhar.

    I must be a little confused regarding your question.
    You can simply change your code frame.setSize(200, 200); to frame.setSize(400, 400);When you say you are unable to see the border are you specifically talking about the border of the frame or the border of the combo box?
    Lance

  • Drop down boxes do not show up. My tabs are not visible. I could barely see the box to type in this question. Something is off. I deleted and reinstalled program it is still just floating words. I work on a Mac with ox 10.6.8

    The browser boxes, tabs, and links do not show up with the needed outlines, colors, and shapes. This box I am typing in was barely visible. Above this box is a set of two verticle parallel bars. When I moused over it, I saw it was for inserting a link, but if I had not been curious I would not have known what those lines were for. When I look at this page on PC I have a colored blue backdrop. It is not visible on the Mac. The search box does not have the image of the magnifying class and the arrow does not show up where it should be. The words Post Question just appear below the statement we have made some educated guesses about your browser. I thought maybe it had been a theme that was applied, but I do not see how it could have come on when I trashed the old version of the firefox.

    A;though the CSS is very well documented, there are those that ignore those signs. Look at the following
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: auto;
        float: left;
    The rest have been given a width of 15em, so this value may be a good start.
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        border: 1px solid #CCC;
       width: auto;
        background-attachment: fixed;
    Just keep the border property and remove the other two.
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
    ul.MenuBarHorizontal li.MenuBarItemIE
              display: inline;
              f\loat: left;
              background: #FFF;
    The following is the original for the above
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
            display: inline;
            f\loat: left;
            background: #FFF;
    Cheers,
    Gramps

  • Content OF  Panel Is Not Visible. Need Help

    Hi Guys,
    Can someone tell me why the contents of the "VisPanel" (JPanel) class is not showing up in the main window. I just don't understand why it is not visible after i add it to the main window.
    Here is the code. You can test it. Only the button shows up. The contents of "VisPanel" class is not visible.
    Replace the images in the "VisPanel" class with any image of your choice. I made them 130 X 130. I would have like to add the images in the post but i don't think it is possible to add images to post in this forum.
    public class TilesImage extends JFrame{
         private static final long serialVersionUID = 1L;
         public TilesImage(){
                this.setLayout(new GridLayout(2,1));
                this.setSize(600,600);
                this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                VisPanel vis = new VisPanel();
                JPanel pana = new JPanel();
                pana.add(vis);
                BufferedImage sub = vis.getImg().getSubimage(261, 260, 129, 129);
               JButton but = new JButton(new ImageIcon(sub));
               pana.add(but);
               this.add(pana);
               this.setContentPane(pana);
               this.setVisible(true);
               repaint();
           public static void main( String[] args ) {
                 new TilesImage();
                 //new VisPanel();
    class VisPanel extends JPanel{
          private static final int IMAGE_TYPE = BufferedImage.TYPE_INT_ARGB;
           private BufferedImage img;
          public VisPanel() {
                 // here you should create a compatible BufferedImage
                 //img = new BufferedImage( 450, 350, IMAGE_TYPE ); 
                 img = new BufferedImage( 525, 500, IMAGE_TYPE );
                     this.setSize(img.getWidth(), img.getHeight());    
                 final int NB_TILES = 4;
                 BufferedImage[] tiles = new BufferedImage[NB_TILES];
                 tiles[0] = createHorizontalRail( new Color( 255, 255, 255 ) );
                 tiles[1] = createVerticalRail( new Color( 255, 255, 255 ) );
                 tiles[2] = createCrossing( new Color( 255,   0, 255 ) );
                 final int[][] map = new int[][] {
                             {4, 4, 1},    
                               {4, 4, 1},
                               {0, 0, 2},
                               {4, 4, 4}, 
                 for (int i = 0; i < map[0].length; i++) {
                       BufferedImage tile = null;
                     for (int j = 0; j < map.length; j++) {
                          if(map[j] == 0){
                   tile = tiles[0];
                   for (int x = 0; x < tile.getWidth(); x++) {
              for (int y = 0; y < tile.getHeight(); y++) {
              img.setRGB( x + i * 130, y + j * 130, tile.getRGB(x,y) );
                   //img.setRGB( x + i * 45, y + j * 32, tile.getRGB(x,y) );
              } if(map[j][i] == 1){
                   tile = tiles[1];
                   for (int x = 0; x < tile.getWidth(); x++) {
              for (int y = 0; y < tile.getHeight(); y++) {
              img.setRGB( x + i * 130, y + j * 130, tile.getRGB(x,y) );
              if(map[j][i] == 2){
                   tile = tiles[2];
                   for (int x = 0; x < tile.getWidth(); x++) {
              for (int y = 0; y < tile.getHeight(); y++) {
              img.setRGB( x + i * 130, y + j * 130, tile.getRGB(x,y) );
         this.setVisible( true );
         private BufferedImage createHorizontalRail( final Color c ) {
         final Random r = new Random();
         BufferedImage img = null;
         try {
         img = ImageIO.read(new File("images/crossingsHorizontal.JPG"));
         } catch (IOException e) {
         return img;
         private BufferedImage createVerticalRail( final Color c ) {
         final Random r = new Random();
         BufferedImage img = null;
         try {
         img = ImageIO.read(new File("images/crossingsVertical2.JPG"));
         } catch (IOException e) {
         return img;
         private BufferedImage createCrossing( final Color c ) {
         final Random r = new Random();
         BufferedImage img = null;
         try {
         img = ImageIO.read(new File("images/railCrossing2.JPG"));
         } catch (IOException e) {
         return img;
         public void paintComponent(Graphics g) {
         g.drawImage(img, 0, 0, null);
              public BufferedImage getImg() {
                   return img;
              public void setImg(BufferedImage img) {
                   this.img = img;
    Thanks for your help.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    kap wrote:
    The "pana" panel must contain both the contents of the "VisPanel" panel and the button i created. So it is correct to set the contenPane to the "pana" panel. I tried to set the content pane to the "VisPanel" panel. It is visible but the button i added to the "pana" panel cannot be visible.
    I hope you understand what i mean here.He understands exactly what you mean and has pointed out your mistake and offered a decent solution. I suggest you take his advice and set the layout of pana not the JFrame.

  • HTML style not visible in Peoplesoft But able to view in Preview RTF templa

    Hi Team,
    Anyone help me urgent. I am not able to view the HTML style in HyperLink in Peoplesoft Online. But i am able to view in Preview tab. I am wondering.
    i.e. My data's are able to view in online but tables that border are not visible. But it works in preview table. Can anyone guide me on this. Please?
    This is the code snippet which i have used in RTF template: (Cross tab report).
    <?for-each-group@column:row;./RANGESIZE?>
    <?RANGESIZE?>
    <?end for-each-group?>
    <?for-each-group:row;./EP_RATING?><?variable@incontext:G1;current-group()?>
    <?EP_RATING?>
    <?for-each-group@cell:/query/row;./RANGESIZE?>
    <?$G1[(./RANGESIZE=current()/RANGESIZE)]/Y_MINIMUM_PCT?>
    <?$G1[(./RANGESIZE=current()/RANGESIZE)]/Y_MAXIMUM_PCT?>
    <?end for-each-group?>
    <?end for-each-group?>
    Edited by: 1006631 on May 21, 2013 1:44 AM

    I would recommend to look very closely and the way the default role is defined in the client 000 Homepage Framework and use this structure and defintions as a guide for implementing your custom role
    In particular the Bank service must be linked to a resource which must point to the required location in the PCD
    Best wishes
    Stuart

  • 1 px border not displaying in HTML email

    Hi,
    I created a HTML with a 1 px gray border. I opened it in Entourage and the border is not visible. Not sure why this is happening....
    Thank you.

    Designing HTML emails is a challenge because email clients differ so much in what they do and do not support.  I don't know about Entourage specifically but Lotus Notes definitely doesn't support borders in HTML emails.
    http://alt-web.blogspot.com/2010/02/html-emails-and-newsletters.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Spry UI (Spry 2.0) Not Visible in IE

    I'm still searching and trying to figure out why the new spry menu bar is not visible in IE, but if you anyone can see or knows something that i may have overlooked please let me know. Other than that the menu bar works great in all other browsers including mobile and touch screens. The menubar is still under construction so the only dropdowns are under "software" if anyone is curious about that.
    Link to my site: http://www.tweetarmory.com/

    The following will work
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="Spry-UI-1.7/css/Menu/basic/SpryMenuBasic.css" rel="stylesheet">
    <style>
    #MenuBar  {
         background-color:#cccccc;     
         font-family: Arial, Helvetica, sans-serif;
         font-weight: normal;
         font-size: 16px;
         font-style: normal;
         padding:0;     
         border-color: #ffffff #ffffff #ffffff #ffffff;
         border-width:0px;
         border-style: none none none none;
    .MenuBar br {
         display:none;
    .MenuBarLeftShrink {
         float: left;
         width: auto;
    .MenuBarRightShrink {
         float: right;
         width: auto;
    .MenuBarFixedLeft {
         float: left;
         width: 80em;
    .MenuBarFixedCentered {
         float: none;
         width: 80em;
         margin-left:auto;
         margin-right:auto;
    .MenuBarFixedCentered br {
         clear:both;
         display:block;
    .MenuBarFixedCentered .SubMenu br {
         display:none;
    .MenuBarFullwidth {
         float: left;
         width: 100%;
    #MenuBar  .MenuItemContainer {
         padding: 0px 0px 0px 0px;
         margin: 0;
    #MenuBar  .MenuItem {
         padding: 0px 24px 0px 0px;
         background-color:#cccccc;     
         border-width:1px;
         border-color: #cccccc #ffffff #cccccc #ffffff;
         border-style: none solid none solid;
    #MenuBar  .MenuItemFirst {
         border-style: none none none none;
    #MenuBar .MenuItemLast {
         border-style: none solid none none;
    #MenuBar  .MenuItem  .MenuItemLabel{
         text-align:center;
         line-height:1.4em;
         color:#333333;
         background-color:#cccccc;
         padding: 6px 15px 6px 39px;
         width: 10em;
         width:auto;
    .SpryIsIE6 #MenuBar  .MenuItem  .MenuItemLabel{
         width:1em;
    #MenuBar .SubMenu  .MenuItem {
         font-family: Arial, Helvetica, sans-serif;
         font-weight: normal;
         font-size: 14px;
         font-style: normal;
         background-color:#ffffff;
         padding:0px 2px 0px 0px;
         border-width:1px;
         border-color: #cccccc #cccccc #cccccc #cccccc;
         border-style: solid solid none solid;
    #MenuBar  .SubMenu .MenuItemFirst {
         border-style: solid solid none solid;
    #MenuBar  .SubMenu .MenuItemFirst .MenuItemLabel{
         padding-top: 6px;
    #MenuBar .SubMenu .MenuItemLast {
         border-style: solid solid solid solid;
    #MenuBar .SubMenu .MenuItemLast .MenuItemLabel{
         padding-bottom: 6px;
    #MenuBar .SubMenu .MenuItem .MenuItemLabel{
         text-align:left;
         line-height:1em;     
         background-color:#ffffff;
         color:#333333;
         padding: 6px 12px 6px 5px;
         width: 7em;
    #MenuBar .MenuItemHover {
         background-color: #999999;
         border-color: #cccccc #cccccc #cccccc #cccccc;
    #MenuBar .MenuItemWithSubMenu.MenuItemHover .MenuItemLabel{
         background-color: #999999;
         color: #000000;
    #MenuBar .MenuItemHover .MenuItemLabel{
         background-color: #999999;
         color: #000000;
    #MenuBar .SubMenu .MenuItemHover {
         background-color: #cccccc;
         border-color: #cccccc #cccccc #cccccc #cccccc;
    #MenuBar .SubMenu .MenuItemHover .MenuItemLabel{
         background-color: #cccccc;
         color: #333333;
    #MenuBar .SubMenuVisible {
         background-color: #ffffff;
         min-width:0%;
         border-color: #ffffff #ffffff #ffffff #ffffff;
         border-width:0px;
         border-style: none none none none;
    #MenuBar.MenuBar .SubMenuVisible {
         top: 100%;
         left:0px;
         z-index:10;
    #MenuBar.MenuBarVertical .SubMenuVisible {
         top: 0px;     
         left:100%;
         min-width:0px;
    #MenuBar .MenuLevel1 .SubMenuVisible {
         background-color: #ffffff;
         min-width:0px;
         top: 0px;
         left:100%;
    .SpryIsIE6 #MenuBar .MenuBarView .MenuItemWithSubMenuHover .MenuItemLabel /* IE6 selector  */{
         background-color: #999999; /* consider exposing this prop separately*/
         color: #000000;
    .SpryIsIE6 #MenuBar .MenuBarView .SubMenu .MenuItemWithSubMenuHover .MenuItemLabel/* IE6 selector  */{
         background-color: #cccccc; /* consider exposing this prop separately*/
         color: #333333;
    .SpryIsIE6 #MenuBar .SubMenu .SubMenu  /* IE6 selector  */{
         margin-left: -0px; /* Compensates for at least part of an IE6 "double padding" version of the "double margin" bug */
    /* Styles to override the above */
    #MenuBar #home .MenuItem {
         background: #cccccc url(http://www.tweetarmory.com/images/buttons/home2.png) no-repeat center top;
    #MenuBar #home .MenuItemHover {
         background: #cccccc url(http://www.tweetarmory.com/images/buttons/home2_hover.png) no-repeat center top;
    #MenuBar #software .MenuItem {
         background: #cccccc url(http://www.tweetarmory.com/images/buttons/software.png) no-repeat center top;
    #MenuBar #software .MenuItemHover {
         background: #cccccc url(http://www.tweetarmory.com/images/buttons/software_hover.png) no-repeat center top;
    #MenuBar #internet .MenuItem {
         background: #cccccc url(http://www.tweetarmory.com/images/buttons/internet.png) no-repeat center top;
    #MenuBar #internet .MenuItemHover {
         background: #cccccc url(http://www.tweetarmory.com/images/buttons/internet_hover.png) no-repeat center top;
    #MenuBar #depot .MenuItem {
         background: #cccccc url(http://www.tweetarmory.com/images/buttons/depot.png) no-repeat center top;
    #MenuBar #depot .MenuItemHover {
         background: #cccccc url(http://www.tweetarmory.com/images/buttons/depot_hover.png) no-repeat center top;
    #MenuBar #forums .MenuItem {
         background: #cccccc url(http://www.tweetarmory.com/images/buttons/forums.png) no-repeat center top;
    #MenuBar #forums .MenuItemHover {
         background: #cccccc url(http://www.tweetarmory.com/images/buttons/forums_hover2.png) no-repeat center top;
    #MenuBar  .MenuItem  {     
         border: none;
    #MenuBar  .MenuItem  .MenuItemLabel{
         color:transparent;
         background-color:transparent;
         line-height:2.8em;
    #MenuBar .MenuItemWithSubMenu.MenuItemHover .MenuItemLabel{
         background-color: transparent;
         color: transparent;
    .MenuBar .MenuItemWithSubMenu .MenuItemLabel{
         background-image: none;
    .MenuBar .MenuItemHover.MenuItemWithSubMenu .MenuItemLabel{
         background-image: none;
    </style>
    </head>
    <body>
    <ul id="MenuBar">
      <li id="home"><a href="http://www.tweetarmory.com/">Home</a></li>
      <li id="software"><a href="http://www.tweetarmory.com/software">Software</a>
        <ul>
        <li><a href="http://www.tweetarmory.com/software/anti-malware">Anti-Malware</a></li>
        <li><a href="http://www.tweetarmory.com/software/test">Test</a></li>
        </ul>
      </li>
      <li id="internet"><a href="#">Internet</a></li>
      <li id="depot"><a href="#">Depot</a></li>
      <li id="forums"><a href="#">Forums</a></li>
    </ul><!--End menubar1-->
    <script src="Spry-UI-1.7/includes/SpryDOMUtils.js"></script>
    <script src="Spry-UI-1.7/includes/SpryDOMEffects.js"></script>
    <script src="Spry-UI-1.7/includes/SpryWidget.js"></script>
    <script src="Spry-UI-1.7/includes/SpryMenu.js"></script>
    <script src="Spry-UI-1.7/includes/plugins/MenuBar2/SpryMenuBarKeyNavigationPlugin.js"></script>
    <script src="Spry-UI-1.7/includes/plugins/MenuBar2/SpryMenuBarIEWorkaroundsPlugin.js"></script>
    <script>
    // BeginOAWidget_Instance_2141544: #MenuBar
    var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
          widgetID: "MenuBar",
           widgetClass: "MenuBar  MenuBarLeftShrink",
           insertMenuBarBreak: true,
          mainMenuShowDelay: 100,
          mainMenuHideDelay: 200,
          subMenuShowDelay: 200,
          subMenuHideDelay: 200
    // EndOAWidget_Instance_2141544
    </script>
    </body>
    </html>
    Notice the change in the HTML markup for the menu. Also I did not style the submenu items. If you have a problem with that, return here.
    Gramps

  • Somebody help me-Why button is not visible??

    button on AircraftCockpitPanel is not visible, plz somebody help me
    and if possible help me to make AircraftCockPit Panel transparent
    import java.awt.Color;
    import java.awt.GraphicsEnvironment;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.JFrame;
    public class RBStrategy implements Runnable
         private JFrame frame;
         static boolean onlyScreen = true;
         static Screen screen;
         static AircraftCockPit aircraftCockPit;
         public RBStrategy(JFrame frame, Screen screen)
              this.frame = frame;
              this.screen = screen;
         public static void main(String[] args)
              JFrame frame = new JFrame();
              screen = new Screen();
              frame.setUndecorated(true);
              frame.getContentPane().add(screen);
              GraphicsEnvironment.getLocalGraphicsEnvironment().
                   getDefaultScreenDevice().setFullScreenWindow(frame);
              screen.setLayout(null);
              aircraftCockPit = new AircraftCockPit(screen);
              new RBStrategy(frame, screen).run();
         public void run()
              do
                   String output;
                   try
                        Thread.sleep(1000);
                   catch (InterruptedException ie)
                        ie.printStackTrace(System.err);
              while (true);
    class Screen
         extends JPanel
         implements
              Runnable {
                   boolean progressing = true;
                   Thread t;
                   Screen()     {
                        this.add(new JButton("ButtonScreen"));
                        this.setBackground(Color.BLACK);
                        this.start();
                 public void stop()     {
                      progressing = false;
                      t.stop();
                 public void start()     {
                      progressing = true;
                      t = new Thread(this);
                      t.start();
                 protected void paintComponent(Graphics g)     {
                           super.paintComponent(g);
                           g.setColor(Color.red);
                           for(int i=0;i<this.getHeight();i=i+10)     {
                                     g.drawLine(0,i,this.getWidth(),i);
                   public void run()     {
                        try     {
                             while(progressing)     {
                                  this.repaint();
                                  Thread.sleep(1);
                        }catch     (InterruptedException e)     {
                             System.out.println("Interrupted");
    class AircraftCockPit
         extends JPanel
         implements  Runnable {
              boolean progressing=true;     
              Thread t;
              JButton jButton;
              Screen screen;
              AircraftCockPit(Screen s)     {
                   screen = s;
                   jButton=new JButton("ButtonCockPit");
                   jButton.setBounds(30,30,40,40);
                   this.setBackground(Color.GRAY);
                   this.setBounds(s.getWidth()*3/4,s.getHeight()>>2,s.getWidth()>>2,s.getHeight()*9/20);
                   s.add(this);
                   this.start();
              public void stop()     {
                   progressing = false;
                   t.stop();
              public void start()     {
                   progressing = true;
                   t = new Thread(this);
                   t.start();
              protected void paintComponent(Graphics g)     {
                        super.paintComponent(g);
              public void run()     {
                   try     {
                        while(progressing)     {
                             this.repaint();
                             Thread.sleep(2);
                   }catch     (InterruptedException e)     {
                        System.out.println("Interrupted");
    }

    Quit multi-posting you are wasting peoples time. I gave you the answer yesterday:
    http://forum.java.sun.com/thread.jspa?threadID=5230919&start=4

  • Jdeveloper - GUI not visible in the visual design editor

    Hello everybody!
    Actually I'm designing a Java Desktop Application with javax.swing. using JDeveloper 11g Release 1 (Studio Edition Version 11.1.1.3.0, Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660), Java Platform 1.6.0_18 and Oracle IDE 11.1.1.3.37.56.60 on Linux.
    My question is related to JDevelopers visual design editor. Most of my forms extend javax.swing.JInternalFrame. Those forms are visible within the visual design editor but for some of my forms I had to create a subclass of JInternalFrame named ITMSInternalFrame.
    package itms.view;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JInternalFrame;
    public class ITMSInternalFrame extends JInternalFrame {
        private MainWindow mainWindow;
        private JButton btnExit;
        protected static final ImageIcon ICOCOMMIT =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/commit-icon.png"));
        protected static final ImageIcon ICOROLLBACK =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/rollback-icon.png"));
        protected static final ImageIcon ICOINSERT =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/add-icon.png"));
        protected static final ImageIcon ICOUPDATE =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/page-edit-icon.png"));
        protected static final ImageIcon ICODELETE =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/delete-icon.png"));
        protected static final ImageIcon ICOUSER =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/user-icon-16x16.png"));
        protected static final ImageIcon ICOWAPPEN =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/wappen-icon.png"));
        protected static final ImageIcon ICOPRINT =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/printer-icon-16x16.png"));
        protected static final ImageIcon ICOPRINTPREVIEW =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/find-icon.png"));
        protected static final ImageIcon ICOITSET =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/folder-Options-icon-16x16.png"));
        protected static final ImageIcon ICOREALESTATE =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/real-estate-icon-16x16.png"));
        protected static final ImageIcon ICOBUILDING =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/building-icon-16x16.png"));
        protected static final ImageIcon ICOROOM =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/room-icon-16x16.png"));
        protected static final ImageIcon ICOPROCESS =
            new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/process-icon-16x16.png"));
        public ITMSInternalFrame(MainWindow mainWindow, String title,
                                 String path) {
            this.mainWindow = mainWindow;
            this.setLayout(null);
            this.setTitle(title);
            setFrameIcon(new ImageIcon(ITMSInternalFrame.class.getResource(path)));
            this.addInternalFrameListener(this.mainWindow);
        public MainWindow getMainWindow() {
            return this.mainWindow;
        public JButton getExitButton() {
            btnExit = new JButton();
            btnExit.setIcon(new ImageIcon(ITMSInternalFrame.class.getResource("grafiken/home-icon.png")));
            btnExit.setToolTipText("Closes this window");
            btnExit.setActionCommand("Exit");
            btnExit.addActionListener(this.mainWindow);
            return btnExit;
    }The forms that extend ITMSInternalFrame are not visible within JDevelopers visual editor. It says "No GUI selected. Double click on an item in the Structure Window to see its GUI here" and in the UI - Log it tells me "Unable to instantiate live instance for btnExit; using placeholder object instead."
    I've used Google to find an answer and I've read certain tips about it in different forums but non of that used to help me. So please, does anyone of guys around here know what to do to solve this?
    I look forward to receiving your advice on this matter.
    Yours sincerely.
    Florian W.

    Hi,
    I remember GUI subclasses to be an issue in 10.1.3. Not sure this has been resolved. Best suggestion is to file a service request with support and have them looking at a test case
    Frank

  • Bordercontainer not visible

    My Flash Builder doesn't show BorderContainer in the list of available components only border. If I manually create a bordercontainer it is not visible in design view and nor is any other component contained by the bordercontainer which makes visualizing my layout a bit tricky. But If I run the application the bordercontainer is there etc. What gives with that? How do I get the bordercontainer in the component list so I can drag it onto the application page in design view and why can't I see it. I am using the latest nightly build by the way.

    Hi,
    IF your Company has NEtweaver License and the SAPNET User has access right to download section, you must be able to add SP Stacks to Download Basket.
    If you have license and use have access, then please contact with local SAP Subsdiary for this problem.
    But to be able to download some patches, you must have Solution Manager & Maintanance Optimizer to approve the items in basket.

  • JButton can not fire ActionEvent

    Hi,
    There is a problem found on JRE 1.5 Update 4on Windows XP for a JButton in my application.
    Here is the short description of the app.
    There are ImageIcons loaded into JButtons. There JButtons are added to a JPanle. The JPanle is then add to a JScrollPane. The scroll pane itself is added as a menu item for a Popmenu. When I click the image icon of the button, it will invoke the action listener's actionPerfromed method. The action listener has been earlier added to the JButtons.
    It workked with JRE 1.4.0 but it fail witj JRE 5.0 Update 4. It is like a bug to me. Or the JButton class stops deliver action events when it is part of a menu item. Any idea why?
    J.

    Hey, good morning, Jaspre
    I found a mistake in my problem statement. You should add a JMenu to the JPopupMenu and add the JScrollPane to the JMenu.
    Maybe the code should not add a JMenu to a JPopupMenu, but it's there in the code. Below is a test which I modify from yours. It does not show the dialog on 1.5.0.4 runtime.
    This test case also shows 2 other possible bugs.
    1.The border text for the JButtons do not position at the right place using JRE 1.5.0.4.
    2.The JScrollPane's behaviour is very strange so that users' experience will not be satisfied.
    For each description, please run it against JRE 1.4.0 and 1.5.0.5 to see what I mean.
    Thanks
    Jack
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ButtonTest extends JFrame
         public ButtonTest() {
              super("ButtonTest");
              ActionListener al = new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        JOptionPane.showMessageDialog(ButtonTest.this,
                             "Clicked " + ((JButton)e.getSource()).getText());
            JPanel panel = new JPanel();
            GridBagConstraints c = new GridBagConstraints ();
            c.fill = GridBagConstraints.BOTH;
            c.weightx = 1 ;
            c.weighty = 1 ;
            GridBagLayout layout = new GridBagLayout();       
            panel.setLayout(layout);
              JButton b;
              for (int i = 0; i < 10; i++) {
                   b = new JButton("Button-"+(i+1));
                   b.addActionListener(al);
                   c.gridx = 0 ;
                 c.gridy = i ;
                 layout.setConstraints(b,c);
                 b.setBorder (BorderFactory.createTitledBorder
                         (b.getBorder (), "border")) ;
                   panel.add(b);
              JScrollPane scroller = new JScrollPane(panel);
              scroller.setPreferredSize(new Dimension (200,500));
              final JPopupMenu menu = new JPopupMenu();
              JMenu submenu = new JMenu();
              menu.add(submenu);
              submenu.add(scroller);
              getContentPane().addMouseListener(new MouseAdapter() {
                   public void mousePressed(MouseEvent e) {
                        popup(e);
                   public void mouseClicked(MouseEvent e) {
                        popup(e);
                   public void mouseReleased(MouseEvent e) {
                        popup(e);
                   private void popup(MouseEvent e) {
                        if (e.isPopupTrigger())
                             menu.show(e.getComponent(), e.getX(), e.getY());
              setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              setSize(600, 400);
         public static void main(String[] args){
              ButtonTest bt = new ButtonTest();
              bt.setLocationRelativeTo(null);
              bt.setVisible(true);
    }

Maybe you are looking for

  • One Controller Multiple Sites

    Is there a guide that can illustrate how this is accomplished. I want to use a common SSID for all the sites but each site will have their own network.

  • Masking works in timeline, not testing or publishing

    Okay, perhaps this has been answered before, but I can't find that answer. I've been having problems with the masking effect in Flash Professional. You see, I had created some text, and then rigged a glint to go across it. When played in the main tim

  • UAC alert every time I open a PDF - Reader 9.4, Win7/64

    Hi all! I notice the blue Windows Defender shield icon appears over the PDF Reader icon. Every time I open a PDF file, or just open Reader, I get a UAC pop-up warning that the app wants to make a change to my computer. Is there a reason for this? I a

  • Illustrator Guides Are Backwards

    Hi I am trying to export my first font from Illustrator (CS6) into Font Lab but when I set the base line to 0 the ascender shows -750 and the descender shows 248, these should be the other way around and it is effecting my letters when I copy and pas

  • Fill in the blanks html5 stacking order issue

    I am using the fill in the blanks quiz slide but when I publish it out to html5 the dropdown boxes are stacking on top of eachother. How can this be fixed? Thanks, Oliver