Explore BrainMass

Explore BrainMass

    Java program to display and hide country flags

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Program starts with an empty flag and none of the country buttons checked. When you select a country radio button, corresponding country's flag is displayed instead of empty flag.

    Please see detailed question below.

    Write an application with the GUI as shown in attachment p9.png .

    Scenarios:
    a. If user clicks any of the Radio Buttons, a flag of that country should appear in place of the "empty flag" icon.
    b. If the button clicked,
    i. Change text on button to "Show" <-> "Hide".
    ii. Show/Hide the flag.

    © BrainMass Inc. brainmass.com March 5, 2021, 1:08 am ad1c9bdddf
    https://brainmass.com/computer-science/graphics/java-program-display-hide-country-flags-564997

    Attachments

    Solution Preview

    Java version "1.7.0_21" was used during development and testing of the attached solution.

    Please rename attached 564997-Flags.java as Flags.java before you compile and execute it.

    If you are compiling and executing the attached program at command line, you can follow these steps.

    1. Place Bahrain_flag.jpg, Empty_flag.jpg, KSA_flag.jpg and Kuwait_flag.jpg in same folder as Flags.java .

    You already have the icons of the images attached to your question. Just ...

    Solution Summary

    Program starts with an empty flag and none of the country buttons checked. When you select a country radio button, corresponding country's flag is displayed instead of empty flag.

    Java version "1.7.0_21" was used during development and testing of the attached solution.

    $2.49

    ADVERTISEMENT