
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Assignment; Class: Intro to Comp Science I; Subject: Computer Science; University: Seton Hall University; Term: Unknown 1989;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!
Please download the following classes from our web site. Make sure to ‘right-click’ and ‘save as …’ to put the files into the current BlueJ project directory.
This class facilitates reading input from “standard in”, i.e. the keyboard, in simple text programs. Methods provided are: public static double readDouble() when the user presses RETURN or ENTER, the method returns a double as entered if possible. If the user enters a non-double number, the program quits. public static int readInt() when the user presses RETURN or ENTER, the method returns an int as entered if possible. If the user enters a non-int number, the program quits. public static String readString() when the user presses RETURN or ENTER, the method returns a String as entered.
This class provides a GUI input field to hold and return a double number. Methods provided are: public double getDouble() returns the number entered into the GUI field as a double if possible, or returns 0.0 and shows “ERROR”. public void setDouble(double x) puts the double number x into the GUI field, properly formatted.
This class helps to create a simple window, containing GUI elements in one row. Methods provided are: public void addLabel(String msg) Adds a String as label to the current line public void addField(JTextField field) Adds an input field such as a DoubleField to the current line public void addButton(JButton button) Adds a button to the current line public void setWindowTitle(String title) Sets the title displayed in the window’s title bar