Purchase Solution

Java program to display and hide country flags

Not what you're looking for?

Ask Custom Question

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.

Purchase this Solution

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.

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 ...

Purchase this Solution


Free BrainMass Quizzes
C# variables and classes

This quiz contains questions about C# classes and variables.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.