I need a scrollable JMenu is it possible?

Hello Ladies and Gentle men!
I'm in a fix to solve this problem! When I try to add to many Item in a
JMenu it falls beyond my screen area. Can you tell how I can have a
scrollable JMenu? I've provided the code below...plz tell me where I
should modify or need to work on.
private void setSubMenu()
          JCheckBoxMenuItem cbMenuItem;
          JMenu submenu=new JMenu("SubMenu");
          for(int i=0;i<=500;i++)
               cbMenuItem=new JCheckBoxMenuItem(" A JChecboxMenuItem");
               submenu.add(cbMenuItem);
It'd be my privilege if anyone can provied me the solution code!!!
Thanks.

Dear raj_chi
Thanks� I�m agreeing with you. I shouldn�t have so many menu items at the same level in the most trivial cases. But at the same time I�m trying to be a little more imaginative thinking what if? your program has a JMenu and it�s gets populated every time the end user installs a program? And someday it might fell beyond the visible area!!! In this case what does the windows like menu does? It scrolls right?
Am I not speaking ideally???

Similar Messages

  • I bought macbook pro used one because i wanna start to develop ios apps and i need Mavericks if it is a possible my mac is 10.6 please help me apple

    i bought macbook pro used one because i wanna start to develop ios apps and i need Mavericks if it is a possible my mac is 10.6 please help me apple
    Model Name: MacBook Pro
      Model Identifier: MacBookPro5,5
      Processor Name: Intel Core 2 Duo
      Processor Speed: 2.26 GHz
      Number Of Processors: 1
      Total Number Of Cores: 2
      L2 Cache: 3 MB
      Memory: 4 GB
      Bus Speed: 1.07 GHz
      Boot ROM Version: MBP55.00AC.B03
      SMC Version (system): 1.47f2
      Serial Number (system): W8******66D
      Hardware UUID: *****
      Sudden Motion Sensor:
      State: Enabled
    <Edited By Host>

    Back up your data, check your applications for compatibility, and download Yosemite from the Mac App Store.
    (121877)

  • I need some help adding music to my slideshow in iPhoto.  When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

    When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

    When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

  • I bought an iPhone 5 in Brazil, but i dropped it in the floor and now i need to fix it. is it possible to make in New York and how much would cost?

    i bought an iPhone 5 in Brazil, but i dropped it in the floor and now i need to fix it. is it possible to make in New York and how much would cost?

    If your iPod Touch, iPhone, or iPad is Broken
    Apple does not fix iDevices. Instead, they exchange yours for a refurbished or new replacement depending upon the age of your device and refurbished inventories. On rare occasions when there are no longer refurbished units for your older model, they may replace it with the next newer model.
    ATTN: Beginning July 2013 Apple Stores are now equipped to do screen repairs/replacements in-house on iPhone 5s. In some cases while you wait. According to Apple this is the beginning of equipping Apple Stores with the resources needed to do most repairs for iPhones, iPads, and iPod Touches that would not require major replacements. Later in the year the services may be extended as Apple Stores become equipped and staffed with the proper repair expertise. So, if you need a screen repaired or a broken screen replaced or have your stuck Home button fixed, call your local Apple Store to see if they are now doing these in-house.
    You may take your device to an Apple retailer for help or you may call Customer Service and arrange to send your device to Apple:
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes international calling numbers.
    iPod Service Support and Costs
    iPhone Service Support and Costs
    iPad Service Support and Costs
    There are third-party firms that do repairs on iDevices, and there are places where you can order parts to DIY if you feel up to the task. Start with Google to search for these.

  • My Mum( a pensioner) is wanting to purchase both an iPhone and iPad.  What is the best way for her to manage her data /calls/txt etc. obviously the cost needs to be as low as possible.  Currently does not have WiFi but uses dongle

    My Mum( a pensioner) is wanting to purchase both an iPhone and iPad.  What is the best way for her to manage her data /calls/txt etc. obviously the cost needs to be as low as possible.  Currently does not have WiFi but uses dongle

    My Mum( a pensioner) is wanting to purchase both an iPhone and iPad.  What is the best way for her to manage her data /calls/txt etc. obviously the cost needs to be as low as possible.  Currently does not have WiFi but uses dongle

  • Please help me with portfolio.I am new in graphic design.I need portfolio done immediately soon as possible otherwise my design advisor will not let me register for fall. I need 15 or 10 artworks to show.Please help me

    Please help me with portfolio.I am new in graphic design.I need portfolio done immediately soon as possible otherwise my design advisor will not let me register for fall. I need 15 or 10 artworks to show.Please help me.

    Farooq,
    If you look at the first one, you should be able to align quite easily as follows, View>Smart Guides being your friends:
    1a) ClickDrag the top flower with the Selection Tool (black arrow) so it is clear of the pointy part;
    1b) Click an empty spot on the Artboard to deselect, then ClickDrag the top flower by its bottom Anchor Point (Smart Guides say anchor when you are close enough to grab it) down to snap to the top Anchor Point on the pointy part (Smart Guides say anchor when you are close enough);
    1c) Do the same for the boroom flower.
    If you look at the third one, to get the triangles and the hexagon sized and aligned precisely, you may, creating them with stroke and no fill:
    3a) Click with the Polygon Tool and select a suitable/chosen Radius and 6 Sides, then Object>Transform>Rotate by 30 degrees (or use the Rotate option in the Transform palette), you may Object>Transform>Reset Bounding Box to have it look nicer;
    3b) Click with the Polygon Tool and select the same Radius and 3 sides, then deselect and ClickDrag the top Anchor Point to snap to the top Anchor Point of the hexagon;
    3c) Object>Transform>Rotate by 180 degrees clicking Copy, deselect, and ClickDrag the bottom Anchor Point to snap to the bottomAnchor Point of the hexagon;
    3d) Select all and Ctrl/Cmd+G to Group (for alignment purposes, you will know why if you try without grouping, see below).
    To create full symmetry, you may use circles rather than almost circular ellipses; you may:
    3d) Click with the Ellipse Tool and select a suitable/chosen Width = height;
    3e) Object>Transform>Move a copy vertically by the Height (= Width) twice (or you may Ctrl/Cmd+D to repeat), to get three circles over one another with no gaps;
    3f) Select the topmost and bottommost ones and Object>Transform>Rotate a copy by 120 degrees twice, to have all the seven circles precisley touching one another; you may Group them, but it is not necessary.
    To have everything aligned, just:
    3g) Select everything and click Vertical Align Center and Horizontal Align Center in the Align palette; you may click the pointy group or the circles ojnce more before aligning if you want to keep it in place (that will make it the key object that the other set is aligned to).
    These ways may also help you further.
    Edit: About half an hour after midnight here. High time to attend to other duties, before the sun is up.

  • I need to know if it is possible to...

    I bought a new computer...
    and i am NOT creating a home network between the two...
    It is possible for me to have internet on both computers at the same time to accomplish the following objective, but the internet on my orignal computer will not be permanent.
    I need to know if it is possible to transfer my entire iTunes library exactly as is from one computer to another...
    either by internet, or by transfering by DVDs or anything.
    Again this has to be more than sharing, it has to be a complete transfer as the internet on the computer with iTunes already set up is not permanent.
    If anyone could help me i would be extremely grateful
    The original computer is a an HP pavilion PC, the second computer is a Notebook HP pavilion.
    THANK YOU.

    You can burn data CD's or DVD's of the content of your library, use those data discs to make the transfer to the second system. If all of the content is on an iPod, you can use your iPod to make the tranfer. see the following. Post back if you have any questions.
    http://docs.info.apple.com/article.html?artnum=300173

  • Need monitor repaired, for cheapest way possible

    I have a 22'' LCD Sony SyncMaster monitor that I bought last year for my birthday. (September 9th) It came with a 1 year warranty from Sony. But around December, the monitor began to flicker. If I left the monitor on for about 10-30 minutes (while it was flickering) it would go back to normal status and act as if nothing happened. Around Janruary, however. It would flicker and never stop. And then eventually, it just stopped flicking/working/anything at all. I was thinking about taking it into Best Buy and sending it in to be repaired, but I'm scared of how much it will actually cost me. I did not purchase a warranty, but there is still the manufacturer warranty. I want to repair my monitor in the cheapest way possible. Got any advice?

    If you purchased the product from Best Buy and still have the reciept , the geek squad should be able to take care of things for you under the manufacturers warranty providing its still a valid warranty.
    If not, you will need to call Sony directly and talk to their tech support guys and discuss the options with them.
    *******DISCLAIMER********
    I am not an employee of BBY in any shape or form. All information presented in my replies or postings is my own opinion. It is up to you , the end user to determine the ultimate validity of any information presented on these forums.

  • Need to know if this is possible...

    It has been a while since I've worked in Java, so I'm not even sure what I'm wanting to do is possible. The basic principle behind what I'm trying to do is a print queue, here are the specifics:
    1> Files in either PDF or .xlsx should be loaded into a folder called DailyPrint on a network drive. (We'll call it's path Z:\Invoices\Dailyprint)
    2> at the end of the day someone in the office who is not tech savvy needs to be able to print 3 copies of every file in the folder.
    3> The paper in the tray is loaded in the following color scheme : White, Yellow, Red (3 part invoice paper)
    4> The print job needs to print out the files in the following order so that we get a white, yellow and red copy of each file: 0001.pdf (first copy); 0001.pdf (second copy); 0001.pdf (third copy); 0002.pdf (first copy); etc; etc.
    5> The printer that these will print to is a network printer, not hooked to any particular station.
    The following information is static, and would have no reason to let people change it:
    The printer to be used
    The paper tray to be used
    The path to the Folder
    The number of copies (hard coded to 3)
    The order in which the files/copies are printed
    I know that printing from PDFs has been called difficult in other discussions, and I know that I would probably have to use a DocFlavor line to make sure that it printed them correctly, but I need to know if what I am trying to do on this project is possible or if I'm going in a completely wrong direction. Any help would be appreciated.
    Thank you in advance.

    The biggest concern for us is the batch aspect, due to the fact this is not a dedicated printer, so it is better for us to tie it up for 20 minutes at the end of the day rather than constantly put 3-part paper into the printer for each invoice. We only have one computer with the full Adobe Acrobat, the rest have Microsoft's "Save as PDF" plug-in for Excel/Word, so we can make each file into a PDF but at the end of the day when we want to batch print all of the invoices for the day we could only come up with 3 possible senarios:
    1> Stop producing invoices 1 hour before end of day, and have one user go into the "dailyprint" folder from the computer with Acrobat, compile all of the individual PDFs into one massive PDF and then do a group print of three copies.
    2> Stop producing invoices 1 hour before end of day, separate the invoices into several groups and have the 3 people in our department (it's a very small office, I'm both the technical lead and an underwriting assistant.) print them out, doing three copies of each (and hoping that someone doesn't forget to change the "copies" setting to 3)
    3> Write a program or find a program that would allow us to batch print 3 grouped copies of each file in the "dailyprint" folder.
    Because I used to program a lot in Java I figured I would look into #3 and see if it would be a time saver or if option #1 would be better. I think our next biggest concern would be to make sure that it printed to the correct printer, which is why I was wondering about hardcoding the specific printer in the program. After looking through the Print Service API guide and seeing people's responses it does look like a program would be possible, but hard coding the printer, or even giving a drop down box to select which printer, is going to be the hard part of this whole thing.

  • Need Multiple Instance of MDI Form, Possible ?

    Hi,
    I have a button in outlook,  that when clicked runs an Winforms application as addin.  The app has main MDI window and uses lots of .xsd files (Typed Datasets) for database activity.
    I have a situation where we want to shift all 2014 data into and as OLD database and only 2015 onwards records with be in current database.  But we also want users to view old data.  
    The immediate thought with minimum changes is that if we can create two instance of MDI Window (Running separately from each other in process ) then both can have different connection strings  and program will run as usual getting data
    from respective database.  
    Note: Connection strings are defined in and as global::AppName.Properties.Settings.Default.cnn and same is used everywhere in the code including .xsd files (Typed Datasets)
    Any Guidance or Better Thoughts to achieve the task.
    Regards

    Thanks Phill for the response.
    But in both of the techniques I will have to modify the code (SQL) at many places and do round of testing.
    Its a 4yr old code and not everything is in stored procedures, some are dynamic sql coming from code etc etc.
    Another factor which I forgot to mention was that we want to Re-numbering/Restart of all AutoIncrement Fields.
    This might be in conflict with either of your suggestions.
    if it was just WinForms application, I think it would be easy to run multiple instance.  but in my case its an outlook addin. My view is somehow if it is possible to manipulate and spawn two instance running as different process, that it would be awesome.   
    Any thoughts ?
    Regards
    Hello,
    a. >>But in both of the techniques I will have to modify the code (SQL) at many places and do round of testing.
    b. >>Its a 4yr old code and not everything is in stored procedures, some are dynamic sql coming from code etc etc. 
    c. >>Another factor which I forgot to mention was that we want to Re-numbering/Restart of all AutoIncrement Fields.
    From these words above, it seems that you didn't want to edit the current form, and want to copy that and edit it to display the old data, and do some other modifications, right?
    We could create another form and copy all controls and code from the main form, and edit them to display the old data by changing the connection string, but it still needs us modify the code at many places.
    We could create another instance of the main form, and get that displayed, but it will still display the same data unless we changing the connection string and query.
    To sum up, no matter which way we selected, it still needs us to edit the code include query and connections strings at many places.
    >>if it was just WinForms application, I think it would be easy to run multiple instance.  but in my case its an outlook addin. My view is somehow if it is possible to manipulate and spawn two instance running as different process, that it would
    be awesome.   
    The key issue is that where did you display these data, you want to display them inside the form, right?
    Inside the button click event of that add-in, you could show multiple window forms, one for old data, the other for 2015 data, they will not disturb each other.
    Regards,
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Need to see if this is possible

    I have a form with a drop down of possible issues...
    Is it possible to make certain text boxes required if a
    specific drop down
    selection is made?
    Ex.
    Drop Down
    Price
    Customer Service
    Other
    If Price is selected, then atleast the 1st text box below is
    required. If
    they select anything else in the list then they can submit
    the form without
    issue.

    You need to use JavaScript to conditionally affect the
    'enabled' property of
    the text fields. (unless you want to do this sever side, but
    JavaScript is
    likley the best way to go)
    "Daniel" <[email protected]> wrote in message
    news:elsdpl$2jc$[email protected]..
    >I have a form with a drop down of possible issues...
    >
    > Is it possible to make certain text boxes required if a
    specific drop down
    > selection is made?
    >
    >
    > Ex.
    > Drop Down
    > Price
    > Customer Service
    > Other
    >
    >
    >
    >
    > If Price is selected, then atleast the 1st text box
    below is required. If
    > they select anything else in the list then they can
    submit the form
    > without issue.
    >

  • Scrollable JMenu?

    Hello everyone,
    I've recently been creating a small chat program, and I figured I had enough base essentials that it was time to add some customization. I want a font menu that will give the user to change the message box (JTextArea) to any font that is installed on their system and to set a size between 8 and 14. To do this, I used the following code:
    JMenu fontMenu = new JMenu("Font");
            customize.add(fontMenu);
            //TODO make this scrollable
            GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
            Font[] fonts = e.getAllFonts(); // Get the fonts
            for (Font f : fonts)
                final Font font = new Font(f.getName(), f.getStyle(), 10);
                JMenuItem fontItem = new JMenuItem(f.getName());
                fontMenu.add(fontItem);
                fontItem.addActionListener(new ActionListener()
                    @Override
                    public void actionPerformed (ActionEvent ae)
                        boolean ok = true;
                        do
                            String stringSize = JOptionPane.showInputDialog(null,"Enter a font size between 8 " +
                                      "and 14", "Font Size", JOptionPane.QUESTION_MESSAGE);
                            try
                                int size = Integer.parseInt(stringSize);
                                if (size < 8 || size > 14)
                                    ok = false;
                                else
                                    ok = true;
                                    convArea.setFont(new Font(font.getName(), font.getStyle(), size));
                                    systemMessage("Font changed to " + convArea.getFont().getName() +
                                            ", size " + convArea.getFont().getSize());
                            catch (NumberFormatException ex)
                                ok = false;
                        }while (!ok);
            }Just so you know, customize is the name of a JMenu. systemMessage is a method to post a certain message on one user's message box. That's all well and good, but there's so many fonts installed on a system that it spills way off the screen, as shown in this screenshot: http://i36.tinypic.com/21evzpk.png
    How could I make that the JMenu fontMenu limited to approximately 10 JMenuItems visible at once, and then make it scrollable using a scrollbar or the mouse wheel or scroll buttons (similar to the bookmarks menu in Firefox or Google Chrome when there are a lot of bookmarks).
    Any help would be greatly appreciated. Thanks in advance.
    Edited by: Skyline969 on Aug 26, 2010 7:53 PM

    This is great! I'll work on implementing it tomorrow. Thanks.
    And I'll consider that in the future. Sorry, kind of new to the forums and haven't had time to look around. I was flustered and found the first semi-applicable location and fired my question.

  • PowerBook G4 Airport Extreme b/g need upgrade to N. Is it possible

    I have a problem trying to upgrade the Airport Extreme on this PowerBook G4. Its running 10.5.8 and has a PowerPC processor. The Airport came with the machine.
    Its currently suggesting its capable of working on B and G networks. I found this info in the Network Utils. After I upgraded the router to the Linksys WRT320N and set it to 5Ghz it does want to play ball.
    Also got an iMac G4 10.4 (retro dome) that can't connect either.
    Apparently this N 5Ghz is the future. According to the rest of us, so is wireless. I currently have a £140 wireless router with a bunch of wires crawling across the floor from it. PlayStation 3 can't cope with it either!
    The Intel MacBook works fine although Safari had some issues with updating the routers firmware via the web browser interface.
    I believe that apple had issued some updates for the Airport a short time ago and figured that this would go across the board with all their Airport Extreme cards. Does anyone have any insight, if or when this might happen before I go off and buy hundreds of wireless USB adapters to find the one that works with these Macs?
    Any help here would be greatly appreciated...
    (Cinderella's glass slipper or is it the frog and the Princess? Are somethings ever worth looking for?).

    Chris Jones22 wrote:
    I have a problem trying to upgrade the Airport Extreme on this PowerBook G4. Its running 10.5.8 and has a PowerPC processor. The Airport came with the machine.
    Its currently suggesting its capable of working on B and G networks. I found this info in the Network Utils. After I upgraded the router to the Linksys WRT320N and set it to 5Ghz it does want to play ball.
    Also got an iMac G4 10.4 (retro dome) that can't connect either.
    Apparently this N 5Ghz is the future. According to the rest of us, so is wireless. I currently have a £140 wireless router with a bunch of wires crawling across the floor from it. PlayStation 3 can't cope with it either!
    The Intel MacBook works fine although Safari had some issues with updating the routers firmware via the web browser interface.
    I believe that apple had issued some updates for the Airport a short time ago and figured that this would go across the board with all their Airport Extreme cards. Does anyone have any insight, if or when this might happen before I go off and buy hundreds of wireless USB adapters to find the one that works with these Macs?
    Your older equipment cannot operate wirelessly in the 5 GHz band. A firmware update cannot supply the needed hardware upgrade.
    You would seem to have two options:
    1) Reconfigure your Wi-Fi equipment to support 802.11g (2.4 GHz).
    2) Buy a USB 802.11n adapter for each of your old devices. It shouldn't be hard to determine which ones will work with your Macs. Whatever you buy, be sure that it works with the USB ports (USB 1.1 vs. USB 2.0).

  • Need help with info about the possibility of altering images when saved in a different format

    I am very new to the design world.  I have a printing business and received and image to be printed in Adobe Acrobat (I think).  I needed to resize the image to be printed and took it into Photoshop CS6 where I cropped the edges.  I then resave it as a PDF and took into a printer software, Fiery.  Fiery has an Impose function where you can repeat an image to layout it on the correct paper size.  It essentially just copies the original image several times depending on the layout.  This particular image I repeated to 3 up and 1 across.  When printed it came out with a magenta streak through the center image only.  I have had the machine checked and they are adamant it's not a printer issue but a software issue.  That once I altered the original image by resizing it that I altered the image and that I can't expect it to come out as seen on the screen.  I've printed it all sorts of different ways and it only occurs with the 3 up 1 across image.  I know that images can be changed when saved from program to program but this situation does not make sense that it is only the one area and layout that this shows up. I would appreciate any help, input, answers that anyone has.  Again, I'm new to this and would like to understand if this is a potential for further printing jobs so that I can do what I need to avoid this situation. 
    Thank you for your time.
    Jessica

    Jessica,
    Without knowing how the original graphic was created it is hard to tell you how to handle it. What is the name of the file? (Only the file suffix is important). If the file's origin was in a drawing program and/Or InDesign, then the document should be handled differently if the document is a raster image best handled by a program like Photoshop.

  • Need more than 8 Audio Streams - Possible solution

    Referring to this topic (now archived so cannot reply): http://discussions.apple.com/message.jspa?messageID=12870874
    Wikipedia DVD entry "DVDs can contain more than one channel of audio to go together with the video content, supporting a maximum of 8 simultaneous audio tracks per video. This is most commonly used for different audio formats—DTS 5.1, AC-3 2.0 etc.—as well as for commentary and audio tracks in different languages."
    I thought I better reply to the post above as it this work-around might not be obvious at first. In the post jasdipBoy asks is it possible to have more than 8 audio streams (i.e. languages) on DVD Studio Pro. Unfortunately you can't as the Wikipedia entry says, but as a possible work-around you could always have the same video twice - on two different tracks and split the audio/languages between the two.
    The issues you should be aware of is the lack of being able to select each language while playing the video (as some of the languages will be on another track) and if you can actually fit the video twice on the DVD as this method will take twice the space.
    But most DVD consumers select the language in the DVD menu anyway so as long as you build that selection into the menu, you should be covered.

    Hi,
    You could make a two disc set and split the language options,
    They make a two disc case that would hold it and look profesional.
    J>H<L

Maybe you are looking for

  • S.M.A.R.T status, performance, and disk I/O issues

    Basically, this post is about performance issues, that seem to be related to the hard drive. 1 month ago, I started having problems with applications freezing for a dozen of seconds, then working back after the beachball cursor stopped spinning. Duri

  • HT201401 How to unlock my apple i phone 4s, IMEI No- ****

    How should i unlock my apple i phone 4s.It shows no sim even if the sim is existing in it. <Edited By Host>

  • Need some help with the Select query.

    Need some help with the Select query. I had created a Z table with the following fields : ZADS : MANDT VKORG ABGRU. I had written a select query as below : select single vkorg abgru from ZADS into it_rej. IT_REJ is a Work area: DATA : BEGIN OF IT_REJ

  • CONVT_CODEPAGE, CX_SY_CONVERSION_CODEPAGE

    A character set conversion is not possible. At the conversion of a text from codepage '4110' to codepage '4102': - a character was found that cannot be displayed in one of the two codepages; - or it was detected that this conversion is not supported

  • IOS native extension for networkinfo throws an error

    Hello, I'm trying to check wether the active connection on a device is Wifi or mobile data connection. On android this works fine but on iOS there is a problem. A native extension exists for this see here.  The problem is that the line below throws a