How to set back ground

I have a jMenu Frame, and i am trying to set its background to black, but it seems like I am missing something here:
jMenu.setSize( 300, 300 );
jMenu.setLocation( 500, 500 );
jMenu.getContentPane().setLayout( new FlowLayout() );
jMenu.addWindowListener( new MyWindowListener() );
// Create button for the menu frame
JButton jbStart = new JButton("Start");
jbStart.setActionCommand("Start");
JButton jbExit = new JButton("Exit");
jbExit.setActionCommand("Exit");
JButton jbCredit = new JButton("Credit");
jbCredit.setActionCommand("Credit");
//Add TextField for player to enter their name
JTextField jtPlayer1 = new JTextField( 15 );
JTextField jtPlayer2 = new JTextField( 15 );
// Add listener to button and text field
jbStart.addActionListener( new MyActionListener() );
jbExit.addActionListener( new MyActionListener() );
jbCredit.addActionListener( new MyActionListener() );
jtPlayer1.addKeyListener( new MyKeyListener() );
jtPlayer2.addKeyListener( new MyKeyListener() );
// Add button into the Menu frame
jMenu.getContentPane().add( jbStart );
jMenu.getContentPane().add( jbCredit );
jMenu.getContentPane().add( jbExit );
jMenu.getContentPane().add( jtPlayer1 );
jMenu.getContentPane().add( jtPlayer2 );
// make the Menu visible
jMenu.setBackground( Color.blue );
jMenu.setVisible( true );
Could anyone tell me what I need to add in order to make it work?
thanks

One thing i would do is add all my components (buttons, textfields, and whatnot) to a JPanel and then set the JPanel as the content instead of having all those getContentPane ().add (); parts...

Similar Messages

  • How to set Back ground job & get my desired output layout in sm36 & sm37 ?

    Hai SAP ABAP/BASIS Gurus,
    I am currently taking ME2N PO Pending value Report by setting variant in input screen & setting my own output layout  ie only four field ie.Plant, Material,Currency,Still to be delivered value will be visible in output screen
    I set Back ground in sm36 using my variant & i saw my output in sm37.. But I cant get output as my desired field..
    This is my problem..
    1) I Cant Get the Same output in shedule job [sm36 & sm37] like When i run in foreground for ME2n.
        I am using ALV Scope of list..
    2) If I use BEST Layout in Scope of list means i get the desired Output field layout as same as my foreground output field..
    I want to get the output layout as desired & also in ALV format[ Useful for excel work]
    Kindly guide me.
    Thanks in advance..
    swetha
    Edited by: Swetha SAP Girl on Jul 2, 2009 5:06 PM

    Hi Swetha,
    To get the missed fields in the spool, while creating the background job(execute in background option) you can see the printer setting block at the end of the background job settings window, in that check the 'Spool Request Max. Width 255 char' check box and then continue. It will generate the spool list with maximum width and you can see all the fields in the spool output.
    Thanks,
    Muthu
    Edited by: Muthu Prabakaran Selvam on Jul 3, 2009 2:35 PM

  • Set back ground color to a particular cell in table view

    hi,
        iam working on a jspDynpage and have a htmlb table view for which i need a way to set back ground color to a particular cell in table view, the color has to be set based on a value..is there a way to do it without using an iterator...well iam using a  cellRenderer for the table but cant find a way to set the colors...if anyone does have a way please do reply...regards

    You can mention the color in <b>textview</b> as well as <b>Label as follows:</b>
          <htmlb:textView     text          = "<span style='background-color: #00FF00'>My Textview</span>"
                              design        = "EMPHASIZED" />
          <htmlb:label for =  "MyLabel"
                       text = "<span style='background-color: #00FF00'>Label </span>"
                       encode = "false"/>
    Reward each helpful answer
    Raja T
    Message was edited by:
            Raja Thangamani

  • How to analyse Back Ground Jobs in BI

    Hi,
    How to analyse Back Ground Jobs in BI
    RSDB2MA1 and RSDB2MA2
    My requirment is to check the error logs for these job
    How to navigate there
    Thanks

    Dear BW user,
    Sm37 and sm50/51
    1)Go to Sm37
    2) Give the job name and in user give as *
    3)press execute or f8
    4) Press job log in the screen..keep refreshing it for update
    5)Press job detaisl..get pid no and wp no..in it
    6) go to sm50/51
    check for given wp no... and pid no..job is running or waiting or not
    sm66
    1)go to sm66
    2)in sm66 you can see only the central instance job running in
    3)You cant find any application server in it
    Hope it helps you,Revert me back if you have any queries
    Assign points if helpful
    Regards
    Bala

  • How to set back to iOS 10.7

    My VPN from work only supports iOS till 10.7.
    I did an upgrade iOS Maverick and have now OS.X 10.9 on my MacBook.
    HOW TO SET BACK TO iOS10.7?

    back up your computer. turn it off and back on. while turning it back on hold down the following keys
    COMMAND+R
    Or it could be COMMAND+SHIFT+R+P im not sure. its one of those.
    then look for the option to reinstall the OS.
    Please see http://support.apple.com/kb/PH3878?viewlocale=en_US

  • How run the back ground jobs

    Hi Experts,
    I have one scenario .
    I have scheduled on program in back ground.
    now that in back . when i excute that back job program.
    I need to  tranfer that data to application server.
    please suggest me how to do this.
    Ramesh.
    thanks in advanice.

    there is a system variable sy-batch which recognises if the job is running in background or not..
    OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    MESSAGE e001(zsd_mes).
    EXIT.
    ELSE.
    *---Data is downloaded to the application server file path
    LOOP AT it_tab2 INTO wa_tab2.
    TRANSFER wa_tab2 TO p_file.
    ENDLOOP.
    ENDIF.
    *--Close the Application server file (Mandatory).
    CLOSE DATASET p_file.

  • How to run program without set back ground Job in production Server?

    Hi,
    I have developed 1smart forms which is takes so much time for execution and sometimes its time out.
    I have used BSEG, BKPF, BSET, KONV, VBRK, VBAP, LIPS, LIKP these tables in smartform.
    So give me proper solution for this issue?
    Thanks
    Yatin Mahetaliya.

    Hi,
    You could call from your program the function module called SXPG_COMMAND_EXECUTE where you will call a command already defined in SM59 transaction code. You will maybe control the return code with sy-subrc. Then it will possible for you to extract data...
    Don't forget that every time you call GUI_UPLOAD or any method or function from the frontend function group or ABAP object by classes like cl_gui_frontend_services, it will be impossible to run in background.
    Try it..
    pherasath

  • Middle click suddenly set to exposé? How to set back to middle click?

    As per title, after using a new mouse (some speedlink thing), I connected my old one again (a and simple microsoft one), and now the middle click is somehow set to exposé, instead of, well, middle click.
    I use middle click for web browsing and it is getting annoying.
    Is there an easy way to set this back, in sys-pref<mouse I can only change the sides...
    EDIT:
    found out that there is a special menu in system preferences to set MS mouses. I've set it back to how it should...
    Message was edited by: Arie3000

    answered by opening my eyes - see edit

  • How to Schedule Back Ground job For every 30 Min...

    Hi friends,
    Please Tell me the steps...
    How to schedule BACKGROUND Job for every 30 Min.
    Please Help me ..its urgent.
    Thanks & Regards,
    Vasu.

    Hi Vasu,
       Goto SM36, here you can create your own jobs and schedule them accordingly.
    Hope this is helpful to you. If you need further information, revert back.
    Reward all the helpful answers.
    Regards
    Nagaraj T

  • HT4993 My phone is stuck on settings screen. How to set back to home screen?

    How can I get back to my home screen?

    Press and hold both the home and power buttons until the phone shuts off.
    Then press the power button to power up again and there is a good chance things will be back to normal.
    Not a very elegant way of getting out of a locked screen but if it is truly locked up as you say it's probably your only way out.
    Cheers!

  • How to kill back ground processes?

    I had installed Amonitor app and it shows there are these 3 processes, poc-bbot, bash, cp running. It was never there. can anyone tell me how to kill it?

    Hi, thanks.
    Actually these 3 processes has never shows up. And yes, i was kill all the apps once i dont use them. my recently open bar is always empty.
    The reason why i has concern is my bat life is shorter when these 3 processes are running. It used to has this, so i restore to factory mode. then after awhile, these came back.

  • Setting back ground on images to be transparent

    Hello,
    Is there a way to set a picture box to be transparent when mounted in Indesign.
    We are mounting EPS's into indesign and they have a clipping path. The background to the image is always white can this be set in a Document preference to set background on a picture frame to be transparent.
    Cheers Joe

    While placing the image in to the layout:
    1. Choose File > Place in InDesign.
    2. Select Show Import Options in the Place dialog box.
    3. Select a file that contains a clipping path, and click Choose (Mac OS) or Open (Windows).
    4. In the Image Import Options dialog box, select Apply Photoshop Clipping Path from the Image tab
    5. Click OK, and place the image.
    or...
    If using IDCS3 (I assume cs4 too, but don't own it yet) you can apply the clipping path after the image is already placed.
    1) Select the image frame with the selection tool.
    2) Choose the menu... Object > Clipping Path > Options
    3) Pick Photoshop Path

  • Setting Back ground job

    Hi Friends,
    I wnat to set the background job with following conditions:
    Monday to Friday
    From 9AM to 6 PM
    To run on every half an hour.
    Can any one guide for the same.
    Regards,
    Sai Krishna

    Hi Friends,
    In our Organization PR is created by user dept. & PR release is completed accordingly. In this process Purchase dept. is not in the release strategy. Now PR is completly released & while converting to make PR to PO, purchase dept. found there is some problem in PR. Is there any way Purchase dept. can reject PR & send to user dept. for correcting it.
    One method is to have Purchase dept. also in release strategy loop. We are having nearly 400 release strategies. To change all these will take much time. Is there any other way.
    Thanks & Regards
    Sai Krishna

  • How to set tool tips for graphic objects.

    Hi
    i have a code like this
    here dst is graphic object but i casted ti Graphic2D object because i have to set back ground color.
    Graphics2D lGraphic = (Graphics2D) dst;
    lGraphic.setBackground(Color.RED);
    lGraphic.clearRect((int) lx, (int) ly, (int) lw + 1, (int) lh + 1);
    lGraphic.drawRect(0, 0, (int) lw, (int) lh);
    so now i want to set a tool tip for this lGraphic Object.
    can any body please post answer for this proble.
    if you will post in advance it will help me a lot.

    so now i want to set a tool tip for this lGraphic Object.Your concepts are all wrong. Read the API for java.awt.Graphics and try to understand that a Graphics object is akin to a paintbrush: it has methods to draw whatever is to be drawn. The painting is not the brush, the brush does the painting.
    To obtain a custom tooltip at certain locations within a JComponent, I think the easiest way is to override getToolTipText(MouseEvent me). The method can return null for locations where a tooltip is not to be shown.
    db

  • How to set a back ground to be shown in the whole browser...

    Hi all,
    1. How to set a background in Adobe Dreamweaver so it's gonna be visible in whole browser no matter what resolution is set, the problem is that I cant set to repeat it as the backgroud is not symetric (picture below):
    http://a.imagehost.org/view/0568/Untitled-2
    2. I would like to know how to create a shiny/glossy objects like rectangle or so in Photoshop. Could you recommended some addons/plugs? An example:
    http://www.istockphoto.com/file_thumbview_approve/6137760/2/istockphoto_6137760-shiny-rect angle-menu-buttons.jpg
    Thanks from advance for any help.
    Regards

    Here's an example using the background image you linked to.
    http://perrelink.com.au/forum/repeat-bg/
    Look at the code and see how I've applied the background image to the body tag in the css.
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://www.perrelink.com.au
    Unique CSS Templates | Tutorials | SEO Articles
    http://www.DreamweaverResources.com
    http://twitter.com/nadiap

Maybe you are looking for

  • InDesign CC 2014 tryout has only some new features and some others are old: strangest thing ever.

    Hi everyone, I have installed a tryout on InDesign CC 2014 today to work on epubs. The app is having all sort of problems. It crashed while making packages. I resetted the prefs and this was fixed. But the most annoying and strange things are the new

  • Combining Photographs in a grid

    How can I create one very large photograph by combining multiple, equally sized photographs in columns and rows with no spacing between the photos? Each photo has a black background. I tried the contact sheet function and it always puts white spacing

  • Page 5 missing features

    There are a few things that annoy me, e.g. DTP previous features. Does Apple not think we need a DTP program, only a word processor??? 1 Missing vertical rulers and drag-in guides, the Arrange features are not enough to do proper layouts 2 Linking of

  • Sap user screen directing to SAP query screen.

    Hi Folks, In general by the time of logging in CRM system its should show user menu, but in my system its directly going to SAp query screen. Please suggest me how to change this to get the normal user screen while logging. BLR

  • Can we attach cost centre to profit centre group?

    Hi all I would like to know whether a cost centre can be attached to profit centre group or is it mandatory to attach it to only profit centre? Also can i maintain profit centre and profit centre group at same level in profit centre hierarchy? Regard