How do i make a JButton act differently depending on a RadioButton group

I want my button to call different code depending on which radio button is activated. i have tryed to use If statements
e.g. if( RadioButton = true) etc but it doesnt recognise the boolean.
any ideas?

I want my button to call different code depending on which radio button is activated. i have tryed to use If statements If there are more than one radio buttons and they are mutually exclusive then ButtonGroup is a good option.This makes selection of only one radio Button automatic and you can get selected button using something like:
buttonGroup.getSelection();----what do you mean by
if( RadioButton = true)I think you should use this :
if( radioButton.isSelected())Thanks!

Similar Messages

  • The white background makes my eyes hurt. How can I make the background a different color?

    The white background makes my eyes hurt. How can I make the background a different color?

    http://www.itworld.com/development/351097/setting-active-menu-item-based-current-url-jquer y

  • How do I make purchases with a different email?

    I have been wondering about this for quite some time now: How do I make an purchases, whether they are for apps or in-app purposes, with a different email?
    I am currently using an iPhone 4 that was given to me by my sister's ex-boyfriend about 2 years ago, and I have been using his Apple account and password to download apps and such. But I don't know how to buy something in the App Store or make an in-app purchase because it requires information/ security questions from my sister's ex-boyfriend's account, which neither my sister or I know, and her ex-boyfriend is long gone by now, so we cannot contact him anymore. So I made my own Apple account and tried to make a purchase from there, but I still needed to answer security questions from my sister's ex-boyfriend's account, which bugged me. I have been thinking that this is the case because I downloaded the apps off his account, and curious if the problem would be fixed if I resetted my iPhone entirely or deleted all the apps that I downloaded with his account, and then re-downloaded them on my new account. The only problem is that, I don't want to lose my progress with any of the apps that I am using currently, and even if I saved them on the Cloud, I would still need to use his account information to bring them back, which I don't want. Also, I have an app that lets me purchase apps from the App Store with points, and I don't want to lose those apps either or else my points would come to waste. So, is it possible for me to use an account different from my previous one, since I don't know its security answers, to make purchases, and without worrying about losing any paid apps and app progress I might have? This really bugs me. Thank you in advance.

    Sorry you're going to lose the progress of all your apps,
    settings - app/iTunes store - sign out and then sign in with your apple id.
    Delete all the apps under his and then download it with your apple id.

  • How can you make one button preform different actions in Xcode?

    How can you make one button "preform a click" and "orderfront"? Is that possible? Because what I am doing is making a welcome window to my application for Mac OS X 10.6, and I have two buttons in that window, one says "Connect" which connects a a WebView to a url and the other button opens up the main window. So how can I a make a button do multiple things at once??

    Ah - If you are just using bindings between various objects from Interface Builder, you can reduce your application code a bit (sometimes quite a bit), but there is only so far you can go. Typically variables and routines are defined in your application that Interface Builder hooks into, so that your application code (usually Objective-C, but can be others) can use these variables and routines to determine what is happening in the user interface.
    I'm not sure how up-to-date the project code is (or what programming code you are familiar with), but you can take a look at Apple's Cocoa Application Tutorial to see what is (usually) involved in creating an application.

  • HOW DO I MAKE A FOLder FOR DIFFERENT GROUPS IN MY EMAIL ACCOUNTS

    as above and how do i make the letter bigger for the email coming in without having to click on them

    Perhaps first you could get a grip on the caps lock key. (Man that is hard to read)
    Right click a folder and select new folder
    This add-on will probably help with display fonts.
    https://addons.mozilla.org/en-us/thunderbird/addon/theme-font-size-changer/
    Instructions to install http://chrisramsden.vfast.co.uk/3_How_to_install_Add-ons_in_Thunderbird.html

  • How can I make awesome bar act normal

    How do I make the notso "awesome bar" keep a web address' I type in? When I click the down arrow there is nothing there even though I have typed 5 websites in the bar and gone to those sites. It worked fine until v23. m Now my 5 websites that I frequent daily are gone. I reverted to v22 and no change. I don't want my history of every website showing up or every little search I have done appearing in address bar. I just want a NORMAL address bar.

    You can check if the browser.urlbar.autocomplete.enabled pref is set to true on the <b>about:config</b> page.
    *http://kb.mozillazine.org/about:config

  • How do you make a SpryMenuBar a different color for each page?

    Hey everyone. I'm new to web design and dreamweaver is definitly kicking my butt. Anyway, I'm trying to create a simple website for a foundation and I want to make each page have a different color Sprymenubar to match the color theme of the different pages. The site will only have about 6 color themes max so this shouldn't be a huge undertaking. The trouble I'm having is I have created the home page (the color green) and right now I'm working on the second page (the color blue). When I added a new sprymenubar and changed the CSS Rule to make the color of the menu blue and the hover color light blue it then changes the color of the menu on the home page from Green to Blue. How annoying! I even tried starting from scratch and inserting another horizontal sprymenubar but I can't seem to make another horizontal sprymenubar with a whole new set of rules independent from the first one. What can I do? Do I have to make an editable region or am I just not clicking a certain button to make the new menubar independent from the first one?
    Examples
    First this
    Then this
    And then this happens 
    Let me know!!

    Ok I found a similar question on this forum that was answered and helped. If anyone comes across this wondering the same thing, copy and paste your SpryMenuBarHorizontal.css file and rename the copy to something like "(Title_Of_Page)SpryMenuBarHorizontal.css" and then replace "SpryMenuBarHorizontal.css" in your code to <link href="../SpryAssets/(Title_Of_Page)SpryMenuBarHorizontal.css" and then you are good to go.

  • How can I make a link a different color than the other links according to the current page?

    Hello.  I have created a navigation bar.  And I would like to style the links to have the current page link a different color than the other links.  For example, if all of the links have a black background, I would like to have the current page link to have a white background.  The reason that I would like to style them this way is so that the visitor knows what page is being visitied.
    I tried different ways but all of them did not show to make any change to the links.  This is what I have so far.  The links work, but all of them have the same color and background.  When on the home page, I would like to have the home page link to have a white background with black letters.  I would appreciate your advice.
    <head>
    ul {
        list-style-type: none;
        text-align: right;
        padding-top: 10px;
        padding-bottom: 6px;
        padding-right: 10px;
    li {
        display: inline;
    a:link {
        color: #FFF;
        background-color: #000;
        text-align: center;
        padding-top: 8px;
        padding-right: 8px;
        padding-bottom: 8px;
        padding-left: 7px;
        text-decoration: none;
    a:visited {
        color: #FFF;
        background-color: #000;
        text-decoration: none;
    a:hover {
        color: #000;
        background-color: #FFF;
        text-decoration: none;   
    a:active {
        color: #FFF;
        background-color: #000;
        text-decoration: none;   
    a.menu:link {
         color: #000   
         background-color: #FFF;
         text-decoration: none;
    </head>
    <body>
    <div class="navigation">
        <ul>
            <li class="menu"><a href="index.html" target="_self">HOME</a></li>
    </body>
    Thank you very much.

    http://www.itworld.com/development/351097/setting-active-menu-item-based-current-url-jquer y

  • How can I make a JButton enabled when the user types smthg in a JTextField?

    Hello,
    I have a JButton and a JTextField on a frame. The JButton is disabled, myButton.setEnabled(false).
    How can I enable the button when the user types something in the text field? Just typing, not pressing enter.
    Thank you

    There isn't one, actually. What you need is a DocumentListener and you have to associate it with the document object associated with the field i.e.
    field2.getDocument().addDocumentListener() (new DocumentListener() {
    });

  • How do I make more than one different artists go under the same album?

    Hey, I've had a little problem lately. I've got an album, with more than one artist in it, and at my iPod touch, the artists are all showing up one by one instead of just one single artist. I want to keep the artists names, but if it can't be solved, I'll take them away and give the album the same artist name.
    -MeThePowerful-
    Message was edited by: MeThePowerful

    In iTunes:
    select all songs of that specific album > right-click > Get Info > Sorting.
    There you can enter the main artist (album artist) of the album. Klick OK.
    Now the album should be listed under the main artist although you have different artist in the artist field.
    Experiment away and see if it works.

  • How do I make a jbutton clickable in a jtable cell?

    This sounds stupid but I can't figure it.
    Thanks

    Hi,
    set a renderer for that cell to be JButton and a cellEditor and set and actionListener on it!!!
    JRG

  • How do I make accordian tabs open different images on the parent page

    I am totally new to spry and hope there is an easy way to achieve what I want to do.
    Basically, I want to use an horizontal accordian spry menu so that when the user clicks on a menu item the text appears in the box but an image opens in a seperate fixed box on the parent page. When selecting another menu item the image changes accordingly (but still in the same fixed box)
    I appreciate any help
    thanks

    > When I insert the three form list/menus Dreamweaver does
    not allow me to turn
    > the lists into links. Javascript allows you to turn them
    into links. All I
    > want to know is what script to write.
    That is because you inserted a plain select form item.
    Insert a JUMPMENU and dw will do the coding for you.
    Open the F1 help, click search and type jumpmenu
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • How do i make the lockscreen wallpaper different than the actual wallpaper?

    When I go into the settings it only gives me the option to change both. i'm on version 4.3.4

    Theyy can't be changed independently. If that's a feature you'd like to see, submit your feedback to Apple:
    http://www.apple.com/feedback

  • How can I make a backup of my iPhoto Library on disk grouped by events

    Dear fellow iPhoto users,
    I have a 2008 Macbook, which has a big 40 gig iphoto library.
    Unfortunaly my Macbook is (literaly) starting to fall apart and I'm afraid it's lifespan is reaching its end.
    Also I don't have enough money to buy a new Mac.
    I stil have an old PC left, but that PC won't be able to read my TimeMachine backup. So what I did is that I made a backup of my iPhoto library folder to an NTFS external drive, using Tuxera NTFS.
    But the Library is grouped By Date. So I won't be able to find back any events on my PC.
    Is there a way to backup my iPhoto Library grouped by Event to a NTFS external drive???
    Thank you in advance.
    Kind regards,
    Dennis from the Netherlands

    You can't use a NAS for an iPhoto Library. End of story.
    iPhoto needs to have the Library sitting on disk formatted Mac OS Extended (Journaled). Users with the Library sitting on disks otherwise formatted regularly report issues including, but not limited to, importing, exporting, saving edits and sharing the photos.
    See this article
    http://support.apple.com/kb/TS5168
    for more. Note also the comment:
    “Additionally, storing the iPhoto library on a network rather than locally on your computer can also lead to poor performance or data loss.”
    You need to export the images from iPhoto to folders and then move those to the NAS - you'll need to do this anyway as iPhoto has zero crossplatform ability.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.
    Apps like iPhoto2Disk or PhotoShare will help you export to a Folder tree matching your Events.

  • How to make A JButton not look disabled when it is  setEnabled(false);

    how do i make a jbutton not look disabled when i setEnabled(false) because when u disabled abutton it changes and takes away the frame of the button it self..is there a way to make it make a sound when its disabled and not take the frame away...example look at windows calculator when u have an answer for example 2 + 2 when the answer is displayed if u try to click the backspacebutton at this point it makes a sound..is this possible in java thanks

    Why did you repost this question??????
    You where given an answer in the other posting. You have not explained why the solution won't work and you haven't provided any further information about your question.
    You also haven't listened to the other advice, you just reposted the question word for word.

Maybe you are looking for

  • How do I best share an iPhoto library to several users on a Lion Server?

    I am considering setting up a Lion Server to use for our family of five. The one thing I struggle to understand from searching for information here, and throughout the Internet is: Can I set up a Lion server to have shared libraries for iTunes and iP

  • How to pass a binding value to a Javascript function?

    Hi, I have this: A binding: #{bindings.DOCUMENT_ID.inputValue} A javascript inserted into the page in this way: <af:commandButton text="Ver Documento" id="cb1" icon="/Images/Document-Preview-icon.png"> <af:clientListener method="openViewer('#{binding

  • HT204154 MBP to Samsung HDTV no picture

    Hi, I have a MBP8.3 OSX 10.9.5. I try to connect to a Samsung series 5203 LED TV as an external second display using a Minidisplayport/thunderbolt to HMDI adapter/cable. The MBP recognizes a Samsung device, but no picture. The Samsung recognizes a wi

  • Rounding up off values using Different Condition types

    Dear All, There is a requirement from the client where they want to round up the values in all the condition type values.For Example: ZPR0-           1525 ZCOM(15%)-  228.75(It Should be 229.00) NBT(Tax2%)   25.93(It Should be 26) Similarly all the v

  • Having architectural difficulty, need help. advice.

    Here is my situation. I have a program that draws pictures which represent real things. There is a database underneath. The pictures represent things and I need to use the database to discern a lot of the info. I split the logic database tables from