Naming Buttons

I have 20 buttons I would like to set their text in a loop, using a variable in their name. How is the correct way to do this.
My current code is
while ( counter <= vector.size()){
jToggleButton+ counter.setText(javaobj.getDesc());
jToggleButton+counter.setEnabled(false);
i++;}
is there an easy way to do this.
Any help is appreciated.

I suppose your buttons are in an array. Or are they in the Vector? :)
Ok i think so. I would do it this way:
for (int i = 0; i < vector.size(); i++) {
JToggleButton button = (JToggleButton)vector.get(i);
button.setText(javaobj.getDesc());
button.setEnabled(false);
}

Similar Messages

  • Naming Buttons - Problem with using Captivate 7 Buttons to Open URL or File

    After spending too much time troubleshooting a button problem, I discovered the importance of naming each item in a Captivate project.
    For some reason I have yet to figure out, publishing to SWF from Captivate causes buttons to function arbitrarily. In my case, I had eight buttons pointing to external URLs, three that worked and five that didn't. All of the buttons pointed to the same external website, only to different PDFs hosted on that site. Each button was named with the default "Button_X" convention as set by Captivate. After trying lots of different settings adjustments, On Enter and On Exit actions, and Play/Pause timings, I did what I should've done from the beginning; changed the names of the buttons.
    Why this worked? I don't know. I've seen hints on other discussions as to SWFs not working well when there are a lot of unnamed or default-named items. If there's some logic to this I would be happy to know it, but for a default setting to cause such a bizarre problem is beyond my comprehension. I could understand if I had named the buttons incorrectly, but I didn't do anything to them; I left them with the names created by default.
    Hopefully this helps someone else resolve a similar issue and, if anything, encourages everyone to follow best practices and use a clear file naming conventions for all projects.

    Hi there
    Perhaps the link below will help?
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Naming buttons in different mc's for eval obj

    Hi
    I'm quite new to flash, from a design background. I'd really appreciate help with this. this is my first web site in flash and I'm getting really confused with movie clips, I made my menu as a collection of buttons in a new movie clip. I wanted to re use this on each page of my site but found that if I edited it the edit rippled all the way through each instance.  So I made different movieclips for each page each with my navigation buttons in them.  Now I want to use the eval obj to reference these buttons from my event listener, I know I must give each button a unique name, will it be ok to use the same name eg "home" for different buttons in different movie clips on different pages and still use one piece of code with the eval obj pointing to the correct label to jump to when it is clicked?
    Also , how do you use one single movie clip for navigation accross different pages if you need to slightly change it for each page ?
    cheers
    chelsea

    place your buttons in their own layer in frame 1 of your main timeline and extend that layer across your entire main timeline.
    then add code for each button to direct the main timeline to the appropriate frame label or number.

  • Applescript Studio - Dynamically named button title

    Can anyone tell me if it is possible to retrieve the title of a button in an Applescript Studio application?
    I have no problem if the title of the button is set in the Attributes Inspector.
    EXAMPLE:
    If I set the title of a button to "test" in the attributes inspector and attach a script to a button like:
    *display dialog (get title of button "btnName" of window 1)*
    the result will be a dialog containing the text "test"
    However, if I set the title of a button through a script like
    *set title of button "btnName" of window 1 to "test"*
    and then try to retrieve it the same way
    *display dialog (get title of button "btnName" of window 1)*
    the dialog is empty
    Does anyone know if it is possible to retrieve these dynamically set button titles?

    The name of the button has an applescript name, which is how I reference it from the script. But, the actual project uses a series of buttons which all have their titles set dynamically from a script. Also the mode of the buttons are set to "On Off" (not that I think that should make a difference) I am running leopard 10.5 with xcode 3.0.
    I'm rather new to Applescript Studio and xcode. I don't know what would be wrong with the set-up. And why I would have no problem setting the button titles from a script but not be able to retrieve them.
    I have come up with a work around, keeping track of the button titles in a separate array. I seems stupid to have to do that rather than access the existing button property, but it does work.
    I will have to set up a simple test to explore what may be going wrong.

  • Radio button 'Names' and grouping

    Ok, I am still working on my Monster form...
    Probably pushing the envelope for what Forms can do...but hey...
    My "buttons" are all named "Button.section.number"  (ex. Button.1.13) so that my validate scripts can quickly go through and build other tables and things....
    In each section, there are 3-4 buttons where I want at-least-one to be selected.
    Obviously, a "Radio Button" will give me ONLY one selected, but I am having NAME problems in that when I try to name them so the scripts will work the button  come out of the group. (and crash Acrobat)
    so...in a section, what I want to have is:
    Button.2.0     (.hidden,  .value = "Grounds")
    Button.2.1 \
    Button.2.2  want these 4 in an exclusive group, where an entry is ".required" for at least one of them
    Button.2.3 /
    Button.2.4              A validate script runs later that looks for "blank" .required fields and reports out using "userName" in an "appAlert"
    Button.2.5
    Button.2.16  (.hidden, .value= "MAX")
    My Validate scripts go through all the sections and all the buttons finding boxes that are checked that represent problems, and copy's the fields "Export Data" to a summary page -AND- looks for empty .required fields  (and other things)
    I would LIKE the user to be forced to select  one of : Serviceable, Deficient, Hazard or N/A  for each section.  (Button.1.1, Button.1.2, Button.1.3, Button.1.4 in this example)
    Do I need a "button_up" script (the same in all 4 buttons) that makes sure there is at least one selected. and clearing/setting the .required's on the fields ?  That seems messy.  I could start the form with the last choice (N/A) checked, but that seems error prone. 
    The current validate script checks for empty .required fields, so if I make all 4 fields as required I will get 4 error messages, not ideal....
    Ideas Please??
    Idea as I was writing this.... Since Button.section.0 is hidden, I can toggle the .required flag on that?  But I still need a script that will set/clear the .required when the user select -any- of the checkboxes/buttons
    In case people are interested, all my sections are different sizes, but Button.section.0 contains the "Section Name" ('Grounds' for example) and when (Button.Section.number).value  = "MAX" you have reached the end of -that- section. It works very nicely and is FAST becasue the build is only done when requested, not continously..
    PS...this works with PC Reader ONLY.  Android reader does not support this but qPDF for Android does.

    I had the same problem; hopefully my solution will be of help to anyone searching this problem via a search engine.
    http://forums.adobe.com/message/4347266#4347266
    Individual radio buttons cannot be named (only the overal exclusion group can be named) or else rawValues will not export.

  • How to run a script A from a button "Button 1" ?

    Hi all, I've got this problem for having a window with several buttons named "Button 1" "Button 2"... and run the script "Script A" if we click on the button 1, the script "Script B" if we click on the button 2 etc...
    Here is my short script :
    #target indesign
    //make a table of contents which send directly to the right script
    var w=new Window("dialog");
    var buttongroup=w.add("group");
    var panel=buttongroup.add("panel");
    var button1=panel.add("button",undefined,"Script A");
    var button2=panel.add("button",undefined,"Script B");
    var button3=panel.add("button",undefined,"Script C");
    var cancel=buttongroup.add("button",undefined,"Cancel",{name:'cancel'});
    buttongroup.addEventListener('click',press)
    w.show();
    function press(e){
        if(e.target.type=="button"){
            if(e.target.text=="Script A"){
                //w.close();
                app.doScript(new File("c/scriptA.jsx"),ScriptLanguage.javascript);
            else if(e.target.text=="Script B"){
                app.doScript(new File("c/scriptB.jsx"),ScriptLanguage.javascript);
            else if(e.target.text=="Script C"){
                app.doScript(new File("c/scriptC.jsx"),ScriptLanguage.javascript);
    Each script A, B and C begins with an app.dialogs.add()
    And here is the problem, it tells me that an alert or a modal dialog is already active
    I tried the w.close() but it doesn't work...
    I don't think addEventListener is what I need, maybe I'm wrong for using a window but it's the only way to give names to the buttons, isn't it ?

    Now I get it... I work both on Mac and Windows but when I tried the 'palette' I forgot that I had only the version CS4 on Windows
    (and I launched the script from the ESTK instead of the script panel..mistake !!)
    Now it works great on the Mac, thank you Peter for the help and for the pdf scriptui

  • Button issues after deployment

    We are having a problem with some buttons after importing an application from another workspace. The issue that we are seeing is that some of our processes and branches that are conditional based on "When Button Pressed" are being changed from a named button to an object id, such as "38008732888312434".
    Consequently, these buttons will not trigger the process or branch and must be manually corrected. We have seen these on some of our previous/next processes along with our custom button processes, however, it is interesting that this doesn't seem to happen on the APEX built-in processes of SAVE, CANCEL or DELETE.
    Has anyone seen this behavior? If so, what is the fix/workaround?

    I also got this issue many times, but didn't got any workarround for that, doing all those changes manually was the only solution I had.
    most of the times I found that if there are any processes or any branches which are not used(disabled) are there in between other working processes or branches this thing happens.
    Tauceef

  • Button styles

    Hi all,
    OK I went to insert a Flash button from with in DreamWeaver CS3 and I get a Message window that says "There are no button styles on your system. Please reinstall DreamWeaver CS3.
    I went to my DW CS3 folder a went to >configuration>Flash Objects and in this folder I see that there are indeed I see 3 folders named buttons, buttons preview & text. So I know that they are on the sys.
    Why does DW CS3 tell me that there not there? Is there something else I need to do so that DW CS3 see these? Any ideas? Thanks for any help.
    I'm on a Mac G5 running 10.5.6.

    I call this a blessing in disguise.  Flash paper, Flash buttons, Flash text were all discontinued in CS4 because they are unfriendly and pose some real accessibility problems for people who can't use Flash. Ask yourself why you need this and then ask yourself if you couldn't do this much better with plain HTML & CSS  or JavaScript behaviors.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics |  Print | Media Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • I can't see my buttons in my ALV report...

    Hello experts,
    I created a PF-status for my ALV report(with checkbox) so I can test if my checkbox is working or not. I created 2 buttons namely button and button1 in SE41. Now, I declared the program name and status name. But when I execute my report the buttons didn't appear.
    Again, thank you guys and have a nice day!

    Hi no problem,
    Goto se41.
    Give the program Name : 'SAPLKKBL'
    GUI status : 'STANDARD'.
    Click the "USER INTERFACE" button(It is for copy the GUI status)
    Give me your program name.
    now the GUI Status 'STANDARD' is available in your program.
    then go to ur program.
    Give the following code:
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
    Set the GUI status
      SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
    ENDFORM.                    "set_pf_status
    then double click the STATNDARD GUI status.
    it will go the Menu painter.
    In that u create ur own Buttons. than activate it.
    In the FM:
    EXPORTING
    <b>I_CALLBACK_PF_STATUS = 'SET_PF_STATUS'</b>
    now u get better idea I believe.

  • Encore Mac - Button Routing

    Hi there folks
    I'm a Mac convert and using a MacBook Pro with Encore CS5. The program is great and I generally know how to use it but I'm having trouble with switching off Auto Routing in my project. Here's the problem:
    If I use one of the standard publicly available menus from within the library, all OK. I have designed my own menu for this project using Photoshop and it works just fine on the Windows version of Encore. However, when I load up the menu in the Mac version and select the menu buttons, showing the routing, there IS nothing in properties/basic where I can switch auto routing off.
    I'm assuming it's something I've left out of my menu but cannot figure out what it is. Is there anyone out there who might be able to help?
    Cheers
    Chris

    Chris,
    That "bottom up" is a factor of the concept of Layers in PS. Going way back, before the days of digital, one used acetate layers to build an image. It might have been with airbrushing, or perhaps dyes, but one built from the Background up. That still holds true with PS and digital, and like the Video Tracks in PrPro, what is above takes prescedence. With Button Layer Sets, that is not so obvious, especially as the Layer Sets that contain the Buttons, are basically Transparent, except for the elements of each Button.
    If you Import a Library Menu into En and then Edit in Photoshop (or just Open one of those Library Menus in PS), you will see that "bottom up" structure and Buttons named Button 1 through Button X. In the Library Menu, any matrix of Buttons has been created and designed for logical flow, say Button 1 across and to the right, to Button 2. Then, Auto-Routing is normally just fine.
    Then, when one moves those Buttons around on the Menu to suit design parameters, things can get a bit confused. Also, depending on which existing Layer Set is active, if we create a new Button Layer Set (for a new Button), the order can get changed again. It is then that one will most likely want to Manually Route the Buttons, or go into the Button Layer Sets, and move them about in the hierarchy. I usually try to be careful, when creating, or moving my Buttons about. I also am quite anal about Renaming each Button Layer Set (be careful as part of that name MUST be retained - before the space and "Button 1"), and then I also change the Text Layer to reflect that name. This makes it far easier to do my linking, as I am no longer dealing with "Button 1" (what appears in the Flowchart in En), or dealing with "Button 1" as it appears in my Menu. I never let Encore sync my Button names to the Timelines' names - I do those to match manually. Normally, with that care and effort, Auto-Route will still work, but I always check it out, and just go with Manually Route Buttons, if things go wonky.
    Knowing how the structure works, keeps one apprised of when things might get out of sorts. That is why I bored you, and others, with the gory details. The more we know, the fewer times we'll be surprised - though there are usually a few "surprises" lurking until we are distracted by something else...
    Good luck,
    Hunt

  • Shell scripts and buttons

    i cannot figure out how to get a button made in interface builder/xcode to run/execute a simple shell script. how do i do it. say i made a regular push button named button and i wanted it to start the "fivemin" shell script i pasted in below. assume the shell script is in my path already, do i need to export the path again as well.
    also, my version of xcode is missing the shell script automator fron the new products options, is this a new thing.
    but i would rather do it in a cocoa app. please give me an example say with a timed loop so i can check to see the process running via ps
    ###name: fivemin
    #!/bin/bash
    # this shell script simply sleeps in $incr second intervals for
    # five minutes
    trap 'echo "fivemin: EXITING"' EXIT
    typeset -i nsecs=5*60 i=0 incr=4
    while [ $i -lt $nsecs ]; do
    sleep $incr
    ((i+=incr))
    done
    exit 0

    To wrap a unix tool you need to use NSTask. Here's a useful tutorial from CocoaDevCentral.
    If you're new to Cocoa as you say (in your other post), then I'd first recommend working through a couple of the basic tutorials knocking around to get an idea of the language and the tools available. Apple's own venerable 'Currency Converter' tutorial is here. MacDevCenter's also got quite a few here. You'll be able to find others on the web.
    My version of Xcode (2.1) has a 'Shell Script Automator Action' in the new project assistant, 'Action' section. I've no idea if this has changed in the latest versions, nor why yours might be missing it. The template used when creating it is located in /Application Support/Apple/Developer Tools/Project Templates/Action/Shell Script Automator Action/.
    Another solution that you might consider is using AppleScript Studio. This would use the 'do shell script' command from AppleScript and would use Interface Builder to create your window and button in a similar manner to a Cocoa version.

  • How to install Windows 7/Vista as 2nd OS and retain predesktop environment (service partition)

    This is a step-by-step instruction how to install Windows Vista or Windows 7 as a second OS on a Lenovo Thinkpad that originally shipped with Windows XP AND how to retain the access to the Lenovo Service Partition.
    I have been searching the internet for instructions like these but could not find anything useful. So I am posting it
    here. Maybe this helps other users.
    I have tested the procedure below with installation of Windows Vista Ultimate (64bit) and Windows 7 Ultimate (64bit). I believe that the procedure will also work with the 32bit versions of these OSs. I am not totally convinced that this works when the OS to install is Windows XP (64bit or 32bit). XP has a completely different boot sequence compared to Vista or 7. The basic steps would remain the same, but the XP setup is less forgiving when it finds an unknown partition. If somebody wants to try it out, please post your results as a reply to this forum entry.
    Never never never try to install an older OS (like Windows 2000 or NT) as a second OS when XP is already installed! This is doomed to fail.
    The procedure below does NOT work for Linux installations. I am not a Linux wizard, but any Linux bootmanager I know about is incompatible with the Lenovo Service Partition.
    The procedure was tested on a Thinkpad R61 model 8918-B9G. It should work similar on other models.
    You definitely need a service partition with Rescue&Recovery version 4. It will NOT work with older versions of R&R or if the service partition is not a type12 partition (see below how to find out about that).
    I assume that the harddisk partitions are unmodified, i.e. still have factory settings. This is likely the case if you
    never attempted any OS install or recovery action. If this is not the case, the procedure may or may not work.
    You also need a bootable CD with a tool that can change the size of your current system partition. I was using gparted live version 0.5.2-9. ( http://gparted.sourceforge.net/ )
    Everything you do is at your own risk. I am in no way related to Lenovo, other than being a customer using their
    products.
    Step 1) Make a full backup of your harddisk. Get yourself recovery CDs for your Thinkpad model if you don't have any. The changes we are about to make can completely screw up your harddrive. A typo is sufficient for that to happen.
    Step 2) Power on the system. Check that you can boot into the Service Partition by pressing the Thinkvantage button when the startup screen appears. (Older systems may have a differently named button.) If there is a problem booting the service partition now, it is likely that the rest of this procedure will not fix it.
    Step 3) From the service partition choose 'Warmstart' to reboot the system. Reboot Windows XP, logon.
    Open a command prompt. CD to the following directory:
    \Program Files\Common Files\Lenovo\BMGR
    On a german language system (like mine) it is
    \Programme\Gemeinsame Dateien\Lenovo\BMGR
    If you have an older IBM system the directory may be named
    \Program Files\Common Files\IBM\BMGR
    or something like that. Maybe you need to search around.
    In the following, I will call this the "BMGR dir".
    Enter the following command:
    bmgr32 /info /v
    You should get an output similar to this:
    C:\Programme\Gemeinsame Dateien\Lenovo\BMGR>bmgr32 /info /v
    It's a Lenovo  MBR
    Opened Master Boot Record to see whose MBR it is.
    It's a Lenovo MBR
    Opened drive for reading
    Partition 0 the SP? no, type 0x07 is not correct
    Partition 1 the SP? (512)  Label is SERVICEV
    Using version 2.05 of Lenovo Boot Manager
    Reading: \\.\PHYSICALDRIVE0
            MBR Sector 1 Index: 1   Checksum: 00    Disabled
            MBR Sector 2 Index: 4   Checksum: 03    Passed
            MBR Sector 3 Index: 5   Checksum: FD    Passed
            MBR Sector 4 Index: 6   Checksum: 58    Passed
            MBR Sector 5 Index: 7   Checksum: 96    Passed
            MBR Sector 6 Index: 8   Checksum: 7F    Passed
            Data Sector  Index: 3   Checksum: F1    Passed
            Original MBR Index: 2   Checksum: BD    Passed
            No Patch Sectors
            Checksum Byte: 00
            Think Flag: 1
            WinPE Partition (0-3): 1        Alt Boot Partition (0-3): 1
            Boot Config: 2 (Service Partition containing two Service OS's)
            Boot State: 0                   Alt Boot Flag: 0
            (Normal booting operation, will boot to Customer OS)
            RRU: 00000000 00000000          Prev Active Part: 255
            Previous Partition Type: FF     Patch IN: 0     OUT: 0
            CIRT Disabled
            TOC: 0000000000000000           Lock: 0
            Show Error: 0                   Halt on Error: 0
            CIRT Load Return: 0
            CIRT Execute Return: 0
            Pause Duration: 10              Scan Code: 0085
            F11 Msg: To boot to the Rescue and Recovery Environment, Press F11
            Check Msg: There has been a signature failure
     #  active  type      start CHS      end CHS      startLBA       size
     0   0x80   0x07      1   1   0   239 255 255           63    301296177
     1   0x00   0x12      0 193 255   239 255 255    301296240     11279520
     2   0x00   0x00      0   0   0     0   0   0            0            0
     3   0x00   0x00      0   0   0     0   0   0            0            0
    C:\Programme\Gemeinsame Dateien\Lenovo\BMGR>
    The important thing to look for is the 0x12 partition type in the partition table at the bottom. This is the service
    partition. If you do not have a 0x12 partition, then you can stop here because the rest of the procedure will not work
    for you.
    Step 4) Shutdown and boot gparted from CD. Shrink the system partition to the desired size. Do NOT touch the service partition! Do NOT attempt to create another partition! Leave the new white space on the disk untouched! Apply changes and restart the system.
    Step 5) Reboot XP. gparted has set the NTFS dirty bit. This will cause XP to run a full CHKDSK. Depending on how much files there are on the partition this may take considerable time. Let CHKDSK run to completion. When CHKDSK finishes, the system will automatically reboot.
    Step 6) XP reboots now. Logon. When loading the desktop, XP will show a popup window, stating that system settings have been changed and new devices been discovered and that the system should be rebooted. This is ok. XP actually recognized the shrunk system partition and applied the necessary changes to its own system parameters. Click YES to reboot the system.
    Step 7) XP reboots. Logon. Open a command prompt, CD to the BMGR dir and enter:
    bmgr32 /info /v
    The output you get should be similar to the output you have seen in step 3, except that the partition 0 size column
    shows a smaller value.
    Step 8) Shutdown, restart. Check that you can still access the service partition by pressing the blue Thinkvantage button when the system startup screen appears.
    Step 9) From the predesktop environment choose warmstart. Reboot XP. Logon, logoff, shutdown.
    DO NOT SKIP THIS STEP!!! If you start the Windows Vista/7 install right after shutting down from the predesktop
    environment, the Win Vista/7 setup program will screw up your harddisk! The Lenovo MBR bootmgr reboot takes two steps for completion. The first step is the shutdown and the second step is executed when booting from harddisk. A boot from the Windows CD will skip this second step and disaster finds its way...
    Step 10) Insert the Windows Vista/7 DVD and boot it. Start the setup. Choose "Custom (advanced)" install. It will show the partitions on the disk. Select the white space (unallocated). Click on "disk options (advanced)". Click on "New" to create a new partition in the white space. Keep the default size, click "Apply". Click "Format". A popup window appears stating that the partition may hold OEM data. Continue. Click "Next". Installation starts.
    Continued in the second post...

    Step 11) Win Vista/XP will reboot several times during installation. You will always see the Windows bootmanager with an entry for "Earlier Windows version" and "Windows Vista/7". DO NOT DARE to touch the blue Thinkvantage button on any reboot or press any function keys!
    Step 12) When the installation is finished, check that you can successfully reboot Win Vista/7 by selecting it from the Windows bootmanager.
    Step 13) Reboot XP by choosing "Earlier Windows version" from the Windows bootmanager. Open a command prompt. CD to the BMGR dir. Enter the following command:
    bmgr32 /info /v
    The output will now look like this:
    C:\Programme\Gemeinsame Dateien\Lenovo\BMGR>bmgr32 /info /v
    Opened Master Boot Record to see whose MBR it is.
    Opened drive for reading
    Partition 0 the SP? no, type 0x07 is not correct
    Partition 1 the SP? no, type 0x07 is not correct
    Partition 2 the SP? (512)  Label is SERVICEV
     #  active  type      start CHS      end CHS      startLBA       size
     0   0x80   0x07      1   1   0   254 255 255           63    109675692
     1   0x00   0x07    239 255 255   239 255 255    109676544    191619072
     2   0x00   0x12    239 255 255   239 255 255    301296240     11279520
     3   0x00   0x00      0   0   0     0   0   0            0            0
    C:\Programme\Gemeinsame Dateien\Lenovo\BMGR>
    startLBA and size will of course differ, depending on the actual partition sizes you have set. Note that Windows setup moved the service partition to entry 2 of the partition table. If you do not see the 0x12 partition then stop here.
    Otherwise the following step will likely screw up you harddisk.
    Enter the following command (case sensitive?):
    bmgr32 /Fbootmgr.bin /m0 /IBM /v
    The output will look like this:
    C:\Programme\Gemeinsame Dateien\Lenovo\BMGR>bmgr32 /Fbootmgr.bin /m0 /IBM /v
    installing MBR
    finding free sectors
    Sector 9 is free
    Sector 10 is free
    Sector 11 is free
    Sector 12 is free
    Sector 13 is free
    Sector 14 is free
    Sector 15 is free
    Sector 16 is free
    Opened Master Boot Record to see whose MBR it is.
    It's a Lenovo MBR
    Opened drive for reading
    Partition 0 the SP? no, type 0x07 is not correct
    Partition 1 the SP? no, type 0x07 is not correct
    Partition 2 the SP? (512)  Label is SERVICEV
    Setting Think bit
    C:\Programme\Gemeinsame Dateien\Lenovo\BMGR>
    This command reinstalled the Lenovo bootmanager in the MBR that was erased by the Win Vista/7 setup program.
    Enter the following command:
    bmgr32 /info /v
    The output will now look like this:
    C:\Programme\Gemeinsame Dateien\Lenovo\BMGR>bmgr32 /info /v
    It's a Lenovo  MBR
    Opened Master Boot Record to see whose MBR it is.
    It's a Lenovo MBR
    Opened drive for reading
    Partition 0 the SP? no, type 0x07 is not correct
    Partition 1 the SP? no, type 0x07 is not correct
    Partition 2 the SP? (512)  Label is SERVICEV
    Using version 2.05 of Lenovo Boot Manager
    Reading: \\.\PHYSICALDRIVE0
            MBR Sector 1 Index: 1   Checksum: 00    Disabled
            MBR Sector 2 Index: 11  Checksum: 03    Passed
            MBR Sector 3 Index: 12  Checksum: FD    Passed
            MBR Sector 4 Index: 13  Checksum: 58    Passed
            MBR Sector 5 Index: 14  Checksum: 96    Passed
            MBR Sector 6 Index: 15  Checksum: 7F    Passed
            Data Sector  Index: 10  Checksum: 01    Passed
            Original MBR Index: 9   Checksum: 12    Passed
            No Patch Sectors
            Checksum Byte: 00
            Think Flag: 1
            WinPE Partition (0-3): 2        Alt Boot Partition (0-3): 2
            Boot Config: 0 (Service Partition containing one Service OS)
            Boot State: 0                   Alt Boot Flag: 0
            (Normal booting operation, will boot to Customer OS)
            RRU: 00000000 00000000          Prev Active Part: 255
            Previous Partition Type: FF     Patch IN: 0     OUT: 0
            CIRT Disabled
            TOC: 0000000000000000           Lock: 0
            Show Error: 0                   Halt on Error: 0
            CIRT Load Return: 0
            CIRT Execute Return: 0
            Pause Duration: 10              Scan Code: 0085
            F11 Msg: To boot to the Rescue and Recovery Environment, Press F11
            Check Msg: There has been a signature failure
     #  active  type      start CHS      end CHS      startLBA       size
     0   0x80   0x07      1   1   0   254 255 255           63    109675692
     1   0x00   0x07    239 255 255   239 255 255    109676544    191619072
     2   0x00   0x12    239 255 255   239 255 255    301296240     11279520
     3   0x00   0x00      0   0   0     0   0   0            0            0
    C:\Programme\Gemeinsame Dateien\Lenovo\BMGR>
    So you have actually regained the Lenovo bootmanager. But you are not done yet.
    Step 14) Shutdown. Restart the system. DO NOT PRESS THE BLUE THINKVANTAGE BUTTON AT THE SYSTEM STARTUP SCREEN!!! IT DOES NOT WORK YET! When the system startup screen DISAPPEARS, quickly press F11 (maybe several times). The system should now boot the predesktop environment from the service partition.
    Step 15) When the predesktop is there, choose "warmstart". When the system startup screen appears, press the blue Thinkvantage button. The system should again boot into the predesktop. The blue Thinkvantage button now works permanently.
    Step 16) Check that you can boot Win XP and Win Vista/7 from the Windows bootmanager. You're done!

  • Problem with GUI in applet

    Hai to all,
    I am having a problem with GUI in applets
    My first class extends a JPanel named A_a
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    public class A_a extends JPanel
    JButton jb;
    JTextArea text;
    public A_a()
    setLayout(new FlowLayout());
    jb=new JButton("Click me");
    //add(jb);
    text=new JTextArea(5,20);
    add(text);
    public void text_appendText(String aa)
    System.out.println("I AM IN A_a");
    text.append(aa);
    text.revalidate();
    revalidate();
    /*public static void main(String ags[])
    A_a a = new A_a();
    JFrame frame=new JFrame();
    frame.getContentPane().add(a);
    frame.pack();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) { System.exit(0); }
    frame.setSize(200,200);
    frame.show();
    and then I am using other class B_b which is an applet carries a exitsing panel (A_a) inside it .
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class B_b extends JApplet
    public A_a a;
    public void init()
    a=new A_a();
    getContentPane().add(a);
    public void text_appendText(String aa)
    final String aaa =aa;
    new Thread(new Runnable()
    public void run()
    a=new A_a();
    a.setBackground(new java.awt.Color(255,200,200));
    System.out.println("I AM IN B_b");
    a.text.append(aaa);
    a.text.revalidate();
    getContentPane().remove(a);
    resize(500,500);
    }).start();
    and the I am using the second applet C_c in which by performing a button action the old panel A_a should get removed and replace the new panel D_a (which is not here )in the applet B_b with all other components(namely button , text fields etc)
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.util.*;
    public class C_c extends JApplet implements ActionListener
    JButton jbt;
    JTextArea jta;
    public void init()
    getContentPane().setLayout(new FlowLayout());
    jbt=new JButton("Click me");
    jbt.addActionListener(this);
    getContentPane().add(jbt);
    jta=new JTextArea(5,20);
    getContentPane().add(jta);
    public void actionPerformed(ActionEvent ae)
    Enumeration e = getAppletContext().getApplets();
    Applet applets = null;
    while(e.hasMoreElements())
    applets=(Applet)e.nextElement();
    if ( applets instanceof B_b)
    System.out.println("I AM CLASS C_c");
    ((B_b)applets).text_appendText(jta.getText());
    ((B_b)applets).remove());
    ((B_b)applets).getContentPane().add(D_d);
    both the applets C_c and B_b are in same browser page
    How can i achive that pls help .

    Just to make the code readable...
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    public class A_a extends JPanel
    JButton jb;
    JTextArea text;
    public A_a()
    setLayout(new FlowLayout());
    jb=new JButton("Click me");
    //add(jb);
    text=new JTextArea(5,20);
    add(text);
    public void text_appendText(String aa)
    System.out.println("I AM IN A_a");
    text.append(aa);
    text.revalidate();
    revalidate();
    /*public static void main(String ags[])
    A_a a = new A_a();
    JFrame frame=new JFrame();
    frame.getContentPane().add(a);
    frame.pack();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) { System.exit(0); }
    frame.setSize(200,200);
    frame.show();
    }and then I am using other class B_b which is an applet carries a exitsing panel (A_a) inside it .
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class B_b extends JApplet
    public A_a a;
    public void init()
    a=new A_a();
    getContentPane().add(a);
    public void text_appendText(String aa)
    final String aaa =aa;
    new Thread(new Runnable()
    public void run()
    a=new A_a();
    a.setBackground(new java.awt.Color(255,200,200));
    System.out.println("I AM IN B_b");
    a.text.append(aaa);
    a.text.revalidate();
    getContentPane().remove(a);
    resize(500,500);
    }).start();
    }and the I am using the second applet C_c in which by performing a button action the old panel A_a should get removed and replace the new panel D_a (which is not here )in the applet B_b with all other components(namely button , text fields etc)
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.util.*;
    public class C_c extends JApplet implements ActionListener
    JButton jbt;
    JTextArea jta;
    public void init()
    getContentPane().setLayout(new FlowLayout());
    jbt=new JButton("Click me");
    jbt.addActionListener(this);
    getContentPane().add(jbt);
    jta=new JTextArea(5,20);
    getContentPane().add(jta);
    public void actionPerformed(ActionEvent ae)
    Enumeration e = getAppletContext().getApplets();
    Applet applets = null;
    while(e.hasMoreElements())
    applets=(Applet)e.nextElement();
    if ( applets instanceof B_b)
    System.out.println("I AM CLASS C_c");
    ((B_b)applets).text_appendText(jta.getText());
    ((B_b)applets).remove());
    ((B_b)applets).getContentPane().add(D_d);
    }

  • Problem with Applets in same page

    Hai to all,
    I am having a problem with GUI in applets
    My first class extends a JPanel named A_a
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    public class A_a extends JPanel
    JButton jb;
    JTextArea text;
    public A_a()
    setLayout(new FlowLayout());
    jb=new JButton("Click me");
    //add(jb);
    text=new JTextArea(5,20);
    add(text);
    public void text_appendText(String aa)
    System.out.println("I AM IN A_a");
    text.append(aa);
    text.revalidate();
    revalidate();
    /*public static void main(String ags[])
    A_a a = new A_a();
    JFrame frame=new JFrame();
    frame.getContentPane().add(a);
    frame.pack();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) { System.exit(0); }
    frame.setSize(200,200);
    frame.show();
    and then I am using other class B_b which is an applet carries a exitsing panel (A_a) inside it .
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class B_b extends JApplet
    public A_a a;
    public void init()
    a=new A_a();
    getContentPane().add(a);
    public void text_appendText(String aa)
    final String aaa =aa;
    new Thread(new Runnable()
         public void run()
              a=new A_a();
              a.setBackground(new java.awt.Color(255,200,200));
              System.out.println("I AM IN B_b");
              a.text.append(aaa);
              a.text.revalidate();
              getContentPane().remove(a);
              resize(500,500);
         }).start();
    and the I am using the second applet C_c in which by performing a button action the old panel A_a should get removed and replace the new panel D_a (which is not here )in the applet B_b with all other components(namely button , text fields etc)
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.util.*;
    public class C_c extends JApplet implements ActionListener
    JButton jbt;
    JTextArea jta;
    public void init()
    getContentPane().setLayout(new FlowLayout());
    jbt=new JButton("Click me");
    jbt.addActionListener(this);
    getContentPane().add(jbt);
    jta=new JTextArea(5,20);
    getContentPane().add(jta);
    public void actionPerformed(ActionEvent ae)
    Enumeration e = getAppletContext().getApplets();
    Applet applets = null;
              while(e.hasMoreElements())
                   applets=(Applet)e.nextElement();
                   if ( applets instanceof B_b)
                             System.out.println("I AM CLASS C_c");
                             ((B_b)applets).text_appendText(jta.getText());          
                             ((B_b)applets).remove());
                             ((B_b)applets).getContentPane().add(D_d);
    both the applets C_c and B_b are in same browser page
    How can i achive that pls help .

    please help me its urgent for my project

  • How to create a jdialog with boxlayout

    Hi,
    I was trying to create a jdialog as simple as plsql login dialog. In attempt to learn how should I proceed I downloaded and modified BoxLayoutDemo.java that is available from java's swing tutorial site:
    * BoxLayoutDemo.java is a 1.4 application that requires no other files.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.Border;
    public class BoxLayoutDemo {
        static JDialog jdlg;
        public static void addComponentsToPane(Container pane) {
            pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
            addTextField(pane);
            addAButton("Button 1", pane);
            addAButton("Button 2", pane);
            addAButton("Button 3", pane);
            addAButton("Long-Named Button 4", pane);
            addAButton("5", pane);
        private static void addAButton(String text, Container container) {
            JButton button = new JButton(text);
            button.setAlignmentX(Component.CENTER_ALIGNMENT);
            container.add(button);
        private static void addTextField(Container container) {
            JTextField txt = new JTextField(20);
            //txt.setMaximumSize(new Dimension(100,20));
            txt.setPreferredSize(new Dimension(100,10));
            txt.setAlignmentX(Component.RIGHT_ALIGNMENT);
            //Border padding = BorderFactory.createEmptyBorder(20,20,5,20);
            //txt.setBorder(padding);
            container.add(txt);
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("BoxLayoutDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Set up the content pane.
            jdlg = new JDialog(frame);
            addComponentsToPane(jdlg.getContentPane());
            //Display the window.
            frame.pack();
            frame.setVisible(true);
            jdlg.setPreferredSize(new Dimension(200,200));
            jdlg.pack();
            jdlg.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }The funniest thing is every thing except the text box is ok. With or without the text box the buttons are shown appropriately i mean they dont stretch. But in case of the text field it seems like that the height of the textfield becomes 60 instead of 20. if I use txt.setMaximumsize(new Dimension(100,20)) then everything seems ok.
    Now it seems like swing has some fetish about textfields. Because even if I dont specify the size of the buttions they dont stretch themsleves but even if I specify the size of the text field and make it the first element so that the last element gets stretched if necessary without affecting it, it will defy the size instruction.Layout managers are really amazing!!!!!!!! and so helpful!!!!!!!!!

    not really sure what effect you want, but try this
        private static void addTextField(Container container) {
            JTextField txt = new JTextField(20);
            //txt.setMaximumSize(new Dimension(100,20));
            txt.setPreferredSize(new Dimension(100,10));
            txt.setAlignmentX(Component.RIGHT_ALIGNMENT);
            //Border padding = BorderFactory.createEmptyBorder(20,20,5,20);
            //txt.setBorder(padding);
            JPanel p = new JPanel();//<-------------
            p.add(txt);//<-------------
            //container.add(txt);//<-------------
            container.add(p);//<-------------
        }

Maybe you are looking for

  • How do I set Time Machine to alternate between two attached external drives (so that if one fails I will have a separate backup to use)?

    Hi Everyone. Thanks in advance for your help. Right off the bat let me say I am using Mavericks 10.9.1 on a 2011 Macbook Pro and using all Lacie external hard drives. I am trying to get Time Machine to alternate between two attached external hard dri

  • Sales order block for planning

    Friends, Our requirement is that, As soon as sales order is created it should be blocked from going to planning unless authorized person released it. I mean once sales order created, if MRP runn is done this requirement shouldn't transfer. Once after

  • How do download Nokia Maps files for Nokia C6-00 o...

    Recently I found an update files to my Nokia C6-00 Nokia Maps file, I stucked at 81MB of 99MB and prompted the download is timeout. I have fail download for 3 times. Is there any where I can download the file manually for Malaysia map ? Thank you.

  • How to create 3 levels of detail based on Wizard code

    I have 3 tables: Orders, Recipes, Ingredients. An Order can have several Recipes attached, and each Recipe has multiple ingredients. I want to create a data entry form for these 3 levels of detail. What I have in mind is a window which shows a form f

  • Item's onorder qty is negative.

    hi experts, I saw some items in my SBO have negative OnOrder quantities. i checked inventory status report and it also shows negative OnOrder quantity, but when I double click the row number to get the detailed information, there are no any quantitie