The Artima Developer Community
Sponsored Link

Java Answers Forum
How do I get this to the Window?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Rob

Posts: 2
Nickname: robm
Registered: Jul, 2003

How do I get this to the Window? Posted: Jul 26, 2003 9:09 PM
Reply to this message Reply
Advertisement
So far I have been able to set up the array (String [] storage = new String[10];) and count ( int count = 0;) which is what I am to display(ie "There are "#" entries in the list") when someone types in a string into a TextField and hits the LeftAction button named "Save"

I however can't get it to display in the Window - :


The message label will display two different kinds messages. One is a status message giving the number of items in the list. The other is an error message. Status messages shall be displayed in a dark color, such as navy (r:0, g:0, b:128); error messages, in red. You will find it easiest if you create two methods to configure and display these two kinds of messages.

Status messages

Create a method that will display the value of count. An example of this status message is shown in the example of the user interface above.
This method does not need any parameters.
Make certain that the label is displaying dark text.
If you are using a custom color for these messages, only instantiate the custom color once, in the constructor.
Error messages

Create a second method that will display error messages.
This method should ensure that the label is displaying red text.
Since there are different error messages to be displayed, the specific text for the error message shall be specified as a parameter to this method.
In the constructor, call the status message method to complete the user-interface.

Any help would be appreciated
R

Topic: Opening a browser by passing an argument?? Previous Topic   Next Topic Topic: Why is it useful in downcast not upcast?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use