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

Similar Messages

  • Why buttons are not visible on many web sites? They are there and function properly if I happen to find them, but the problem makes life difficult.

    The problem occurs on many public sites like Finnair, Gites-de-France etc. I can see only white on the screen. Sometimes it is possible to find the button by guessing where it might locate.

    See:
    * http://kb.mozillazine.org/Website_colors_are_wrong
    * http://kb.mozillazine.org/Websites_look_wrong

  • When minimizing firefox to smaller size, [maximize,minimize,close] buttons are not visible.

    Is it a bug? [Alt-space-x can maximize the window] but why the buttons are not visible?

    I was able to reproduce the problem on [http://nightly.mozilla.org/ Nightly] so I went ahead and filed [https://bugzilla.mozilla.org/show_bug.cgi?id=761594 bug 761594].
    Thanks on reporting this and helping make Firefox better =)

  • More intervals button is not visible in Derpriciation area tab in AS02

    Dear All,
    I want to add new interval for with other depriciation key for a particular asset, but the more intervals button is not visible their. Can any give some inputs regarding this.
    Path:
    AS02 - depricaition area tab - double click on relevant derpiciation area - More Intervals Button (not visible).
    Thanks & Regards
    Krishna Chaitanya.

    If you read the "Rules of Engagement" it says in bold red letters " be sure to search before posting" but no one likes to search.
    Before you post: Rules of Engagement
    Why waste time to search when we can post the same question repeatedly and get a quick reply from people on SDN.
    This is the reason I asked you to search first. You should not get offended by this.
    If you read your original post, have you mentioned anywhere in the thread that you already researched and looked at SFW5 and that you were not able to activate this functionality? So how can you expect us (people on SDN) to know if you have tried any options. So please be specific and detailed when you post. This will only help YOU getting a better solution or suggestion.
    Hope you understand.

  • "change" button is not visible in check status ?

    HI,
    We are under upgrade of SRM 4.0 to SRM 5.0 . In SRM 4.0 "change" button
    is visible in check status even if shopping cart is under approval
    state.
    But in SRM 5.0 "change" button is not visible in check status if
    Shopping cart is under approval state.
    for this i have raised OSS message. SAP replied that "please increase the security level of the buyer from 1 (= no changes
    allowed) to at least 2 (=low)."
    please let me know where exactly i can change this settings?
    Thanks
    Venkatesh P

    Hi Venkatesh,
    Steps :
    1) Go to SU01 of the buyer
    2) Go to Personalization tab
    3) Double click on Personalization object key 'BBP_WFL_SECURITY'
    You will get a pop up for 'Authorization level for Authorization'
    4) Here change the securtiy level from 1(=no changes allowed) to at least 2(=low)
    <b>Reward points for helpful answers</b>.
    Regards,
    Andy

  • Characteristics value assignments screen- the results button is not visible

    Dear Gurus,
    In variant configuration, while i am assignning characteristics values in the characteristics value assignments
    screen, the results button is not visible. Even when I try to go to the results option from the Menu (GOTO > Results),
    it is disabled.
    Can any one tell me why is it so ?
    Regards

    Hi
    I have checked my config profile. it looks ok to me.
    Can u suggest anything in particular that I need to check.
    Rgds
    Vishal Saha

  • Print button is not visible in RDLC report

    hi
    I am developing web application in Visual studio 2012 ,.net framework 4.5,C#.net
    I have designed RDLC report for web application,in report viewer i have given showprint button = true, in browser print is not visible in all the browser.
    How should i give Email functionality in report,is there any sample code for email.
    How to overcome the above two problems,print and Email
       <rsweb:ReportViewer ID="ReportViewer1" runat="server"  Font-Names="Verdana" Font-Size="8pt" 
                InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" 
                    BackColor="#CCCCFF" ShowPrintButton="true"  ShowPageNavigationControls="True" 
                ShowBackButton="True" ShowCredentialPrompts="True" ShowDocumentMapButton="True" ShowExportControls="True" 
                ShowFindControls="True" ShowParameterPrompts="True" ShowPromptAreaButton="True" ShowRefreshButton="True" ShowZoomControl="True"  >
               <LocalReport ReportPath="Report1.rdlc" >
                       <DataSources>
                           <rsweb:ReportDataSource />
                       </DataSources>
                    </LocalReport >
            </rsweb:ReportViewer>
    Thanks&Regards,
    Radhika

    Hi Om Prakasah,
    If I understanding correctly, you created a ReportViewer report, but you can’t see print icon when you run the report in browser. If so, please follow these steps:
    If you can’t see the print icon either when running the report in visual studio, you may have set ShowPrintButton to False in Properties window, then please set it to True.
    If there is print icon in visual studio but not in browser, please update the .NET Framework on your web server to the latest version, because the print icon is by default hidden in some version of browser. For more information, you can refer to the relevant
    link below:
    http://blogs.msdn.com/b/selvar/archive/2013/12/20/reportviewer-2012-control-not-showing-print-icon-when-viewed-from-ie-11-desktop-mode.aspx
    If the problem is not resolved, i would appreciate it if you could give us detailed description of your problem, it’s better to provide the version of ReportViewer and browser, it will help us move more quickly toward a solution.
    Thanks,
    Wendy Fu

  • Button asset not visible in button.

    Details: fifteen buttons, each shows (button asset) a single frame of the target video for that button. First four menus were fine, but starting with the last button on menu five, the video is no longer visible in the button when programmed as the asset in the button editor.
    It is not visible in either the menu or in the button editor. But it does play.
    Now it seems that any new video asset will not be visible in any button.
    is this a memory problem?
    Any suggestions?

    Hi Venkatesh,
    Steps :
    1) Go to SU01 of the buyer
    2) Go to Personalization tab
    3) Double click on Personalization object key 'BBP_WFL_SECURITY'
    You will get a pop up for 'Authorization level for Authorization'
    4) Here change the securtiy level from 1(=no changes allowed) to at least 2(=low)
    <b>Reward points for helpful answers</b>.
    Regards,
    Andy

  • Why changes are not visible in alternate profit center heirarchy?

    Hi
    I did changes in the master data of profit center. I chaged the profit center group in the masterdata of profit center & the same change is visible in the standard heirachy but the changes are not visible in the alternative heirarchy.
    I think it should visible as I did changes in the master data.
    I just want to know why it is like so or there is some other way to change the master data.
    I know i can drag the profit center as well in t code KCH9 or KCH 2.
    After doing so i activated the same.
    Waiting for sugestions, comments.
    Edited by: Smruti Mohanty on Nov 13, 2008 1:47 PM
    Edited by: Smruti Mohanty on Nov 13, 2008 1:47 PM
    Edited by: Smruti Mohanty on Nov 13, 2008 2:03 PM
    Edited by: Smruti Mohanty on Nov 13, 2008 3:02 PM

    Hi,
    If your are using same profit center group(which is used in standard hierarchy) in alternate hierarchy,you will see change.
    if your using different groups in Standard hierarchy and Alternate hierarchy you will not see change in alternate hierarchy.
    hope this helps you.
    Thanks,
    Rau

  • Navigation buttons are not visible and lost it´s functional

    I have an intercative document that i have exported from Indesign. On every page their should be an navigation buttons with functions like
    next , previous , last page etc. Everything works on a PC but on the Mac the buttons are only visible on the first two pages and on the 80 other
    pages they are not visible, but I get the hand with the index finger when i put the pen/mouse on the location where they should be but they have also
    lost their function? Can anyone help me here?

    What you're seeing may be related to a known bug with InDesign CS6: http://forums.adobe.com/message/4482056#4482056

  • Class inhertis from JButton, but button is not visible

    Hi!
    I'm having a class that inherits JButton. The idea was to give the button additional parameters, so it inherits from JButton to have all the attributes from JButton... But the problem is, that the Buttons are only visible when I touch them with the mouse. When I move the window they are invisible again...
    Does anybody know why? Thanks for your help!
    P.S Sorry for my bad english....

    Okay, thanks for that hint!
    Here is the class for the gui:
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.BorderFactory;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.JPanel;
    public class Temp extends JFrame{
         private static final long serialVersionUID = 5945597724189252185L;
         private JMenuItem closeItem = null;
         private JMenuItem newItem = null;
         private JPanel mainPanel = null;
         private JLabel startImage = null;
         private MineFieldButton[][] mines = null;
         public Temp(){
              this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              addMenu();
              this.add(getMainPanel());
              this.pack();
         private JPanel getMainPanel(){
              if (mainPanel == null){
                   mainPanel = new JPanel();
                   if (mines == null)
                        mainPanel.add(getStartImage());
                   else{
                        mainPanel.setLayout(new GridBagLayout());
                        GridBagConstraints c = new GridBagConstraints();
                        c.fill = GridBagConstraints.HORIZONTAL;
                        c.ipady = 20;
                        c.ipadx = 20;
                        for (int x=0;x<mines.length;x++){
                             for (int y=0;y<mines[x].length;y++){
                                  c.gridx = x;
                                  c.gridy = y;
                                  mainPanel.add(mines[x][y],c);
              return mainPanel;
         private JLabel getStartImage(){
              if(startImage == null){
                   startImage = new JLabel();
              return startImage;
         private void addMenu(){
              JMenuBar menuBar = new JMenuBar();
              JMenu menu = new JMenu("File");
              menu.add(getNewItem());
              menu.add(getCloseItem());
              menuBar.add(menu);
              this.setJMenuBar(menuBar);
         private JMenuItem getNewItem(){
              if (newItem == null){
                   newItem = new JMenuItem("New");
                   newItem.addActionListener(new ActionListener(){
                        public void actionPerformed(ActionEvent e) {
                             createMines();
              return newItem;
         private JMenuItem getCloseItem(){
              if (closeItem == null){
                   closeItem = new JMenuItem("Close");
                   closeItem.addActionListener(new ActionListener(){
                        public void actionPerformed(ActionEvent e) {
                             System.exit(0);
              return closeItem;
         public void showGUI(){
              this.setVisible(true);
         private void createMines(){
              initMinesGUI();
              this.remove(getMainPanel());
              mainPanel = null;
              this.add(getMainPanel());
              this.pack();
         private void initMinesGUI(){
              mines  = new MineFieldButton[10][10];
              for (int x=0;x<mines.length;x++){
                   for (int y=0;y<mines[x].length;y++){
                        mines[x][y] = new MineFieldButton();
                        mines[x][y].setBorder(BorderFactory.createRaisedBevelBorder());
                        mines[x][y].setX(x);
                        mines[x][y].setY(y);
                        mines[x][y].setNumber(x*y);
    }And here for the class that inherits JButton "MineFieldButton":
    import javax.swing.JButton;
    public class MineFieldButton extends JButton{
         private static final long serialVersionUID = -1020769129018597011L;
         private int number = 0;
         private int x;
         private int y;
         public int getNumber() {
              return number;
         public void setNumber(int number) {
              this.number = number;
         public int getX() {
              return x;
         public void setX(int x) {
              this.x = x;
         public int getY() {
              return y;
         public void setY(int y) {
              this.y = y;
    }I hope that you can find my error.... And that this is a SSCCE :-)
    Thanks!

  • Button subpictures not visible on DVD

    I have to make a DVD for one of my teachers. After I finished making the menu's and linking the button to the footage in Encore, I previewed it and everything worked well. But when i want to play the DVD in a DVD-Player, suddenly the subpictures of the buttons aren't visible. The buttons do work, and I can navigate though the whole DVD, I just can't see which Button is activated.
    I'm usinge Encore CS6 on Windows 8.
    I'm new to Encore, and I think that I'm overlooking something, but I can't find what.
    Has someone had this problem before? Please help....

    Strange, when the menu is rendered and played well in preview/flash and the test on the project gives no problems it shoud work when you burn it using the DVD encoding setting.
    I presume you use  a one sided/layed disk. What I did when something went wrong I did the project again, sometimes it helped.
    I can't give any other suggestion on this topic. maybe someone els have the solution.

  • COMPLETE BUTTON is not visible in OSA-HIGHER MANAGER WORKFLOW

    Hi
    Its pertaining to OSA, we have two level of appraisal Approval system. Employee-Manager and Higher Manager.
    The problem is when we send the Appraisal Document to Higher manager for completion of Document, the Complete button doesnt appear in BSP, but when i check the in URL that is being generated after the manager has CLOSED PART APPRAISAL in workflow inbox has COMPLETE button, i copied URL and generated the page but the COMPLETE button here is in Display mode. I am not able to close the document.
    I am not able to see the same button in PHAP_ADMIN too.
    The same thing working when i tested earlier, but now its not working.
    Please help.
    Thanks n regards
    Aadi

    Hi Aaditya,
    Goto transaction PHAP_CATALOG. Select the templtae for which you have created the document. Goto the tab "status flow" and check the button in the "in process" stage. if the complete button is not there then it will not reflect in the document.
    Choose the button as Complete and create again. The templte status has to be changed to cancel release. So delete the document to change the status.
    Hope this helps you.
    Regards,
    Subbu.

  • PR05 - Cancel button is not visible

    Hi Gurus,
    In PR05 the 'cancel' button is not been displayed in Development system. It is been displyed in Quality and production system.
    What should be done to get it back? Is it something related to menu customization?
    Please help.

    hi
    check whether the authorization is available for cancellation of  a trip document.

  • Many "click here" buttons are not visible

    Many sites that have the "click here" button or symbol are not visible. I discovered this when moving my mouse to a location the "mouse hand" appeared indicating this was a button to click for a specific purpose. I downloaded the most recent version of Firefox a few days ago, but the problem of hidden buttons remains. This issue of not being able to see click-able buttons started about 6 weeks ago. Have changed themes, views, color schemes, etc. to no avail.
    Any known solutions ?
    thanx
    inspector43

    Make sure that you haven't enabled a High Contrast theme in the Windows/Mac Accessibility settings.
    Make sure that you allow pages to choose their own colors.
    *Tools > Options > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
    Note that these settings affect background images.
    See also:
    *http://kb.mozillazine.org/Website_colors_are_wrong

Maybe you are looking for