Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify the actionPerfomed method from the last program in the lecture notes (the LocalisedGUI class) to also display the current date and time according to

Modify the actionPerfomed method from the last program in the lecture notes (the LocalisedGUI class) to also display the current date and time according to the selected language code. You need to use the DateFormat class. For this exercise, you can choose the formatting style (whether the date and time will be displayed in a SHORT format, MEDIUM format or LONG format).

Program:

public void handleList(){ int index = list.getSelectedIndex(); locale = new Locale(languages[index]); resBundle = ResourceBundle.getBundle("bn026Bundle", locale); nf= NumberFormat.getInstance(locale); greeting.setText(resBundle.getString("greeting")); thousand.setText(resBundle.getString("thousand") + nf.format (1000)); } public static void main(String[] args) { new LocalisedGUI(); }

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions