13-gui-programming

13-gui-programming - GUI programming Graphical user...

Info iconThis preview shows pages 1–22. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: GUI programming Graphical user interface-based programming 1 Windchill • Windchill – There are several formulas for calculating the windchill temperature t wc – The one provided by U.S. National Weather Service and is applicable for a windspeed greater than four miles per hour – Where • Variable t is the Fahrenheit temperature • Variable v is the windspeed in miles per hour 2 Console-based programming 3 In use 4 GUI-based programming 5 Java support • JFrame – Represents a titled, bordered window • JLabel – Represents a display area suitable for one or both of a single-line text or image. • JTextField – Represents an editable single-line text entry component • JButton – Represents a push button • JTextArea – Represents an editable multiline text entry component 6 Instance variables • private JFrame window – References the window containing the other components of the GUI 7 Instance variables • private JTextArea legendArea – References the text display for the multiline program legend 8 Instance variables • private JLabel fahrTag – References the label for the data entry area supplying the temperature 9 Instance variables • private JTextField fahrText – References the data area supplying the temperature 10 Instance variables • private JLabel windTag – References the label for the data entry area supplying the windspeed 11 Instance variables • private JTextField windText – References the data area supplying the windspeed 12 Instance variables • private JLabel chillTag – References the label for the data area giving the windchill 13 Instance variables • private JTextField chillText – References the data area giving the windchill 14 Class constants • private static final String LEGEND = "This windchill calculator" + "is intended for velocities greater than 4 mph.“ – Program legend text 15 Class constants • private static final int WINDOW_WIDTH = 350 – Initial width of the GUI 16 Class constants • private static final int WINDOW_HEIGHT = 185 – Initial height of the GUI 17 Class constants • private static final int AREA_WIDTH = 40 – Width of the program legend in characters 18 Class constants • private static final int FIELD_WIDTH = 40 – Number of characters per data entry area 19 Class constants • private static final FlowLayout LAYOUT_STYLE = new FlowLayout() – References manager that lays out GUI components in a top-to-bottom, left-to-right manner 20 Class constants • private static FlowLayout LAYOUT_STYLE =...
View Full Document

This note was uploaded on 04/07/2008 for the course CSE 114 taught by Professor Tashbook during the Spring '08 term at SUNY Stony Brook.

Page1 / 51

13-gui-programming - GUI programming Graphical user...

This preview shows document pages 1 - 22. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online