5.17 GUI. Xiaoyi Jiang Informatik I Grundlagen der Programmierung
|
|
- Loreen Howard
- 8 years ago
- Views:
Transcription
1 AWT vs. Swing AWT (Abstract Window Toolkit; Package java.awt) Benutzt Steuerelemente des darunterliegenden Betriebssystems Native Code (direkt für die Maschine geschrieben, keine VM); schnell Aussehen (Look) hängt vom System ab: unterschiedliche Schriften, Portabilität eingeschränkt Swing (Package javax.swing; Teil der Java Foundation Classes) Swing-Klassen beginnen mit J : JButton, JLabel,... Vollständig in Java programmiert, eigener Look Baut auf AWT auf Verwendet ein Minimum an systemspezifischen Komponenten 410
2 GUI application program shows the user a graphical interface, which consists of graphical components: Windows Buttons Menus Text fields A user interacts with the application by: Clicking on a button to choose a program option Making a choice from a menu Entering text in a text field Dragging a scroll bar Clicking on a window's close button An action such as clicking on a button is called an event 411
3 Grafische Komponenten: Anzeigen von Text und Symbolen (JLabel) Auslösen von Aktionen (JButton, JMenu) Eingabe von Text (JTextField) Auswahl aus einer festen Menge von Optionen (JCheckBox); gegenseitig ausschließend (JRadioButton) Auswahl aus einer variablen Menge (JList) 412
4 Event-driven programming: A user interacts with a GUI application by causing events. The application must respond to events in the order they arrive. The picture shows this. Each time the user interacts with a component, an event is sent to the application. Different events are sent to different parts of the application. The application has to work correctly no matter what the user does. 413
5 Power of AWT/Swing: I just ask for button (or whatever) objects that do what I want. Somebody else (Swing) does all the real work. The buttons are components that can be added with minimum effort. This is similar to going to a hardware store to get components for your home improvement project. Most of the parts you need already exist. You just assemble them. 414
6 A GUI program consists of three types of software: Graphical components that make up the Graphical User Interface You get graphical components by constructing Swing objects Listener methods that receive the events and respond to them Listener methods and application methods are Java methods that you write Application methods that do useful work for the user Application methods are Java methods that you write 415
7 The Java AWT contains the fundamental classes used for constructing GUIs The JComponent class is derived from Container and is one of the base classes of Swing. The JFrame class is derived from the AWT Frame class. It is usually the main container for a GUI application. The JApplet class (derived from the AWT Applet class) is sometimes used for Web programming, but the Applet class is more frequently used. 416
8 There are more Swing classes than those shown. For example there are several button types derived from AbstractButton. 417
9 Swing Frames: Most GUI programs are created by extending the class JFrame which holds the basic GUI functionality. You extend this class by adding the functions your application needs. Graphical components must be placed inside a container. Visually, a container is a rectangular area of the monitor screen and its components are smaller areas within it. Our first GUI program does not have a listener nor any application code You can click on the frame and drag it around, you can minimize it, you can grab a border and resize it, and so on. All of this is built into the JFrame class (inherited from its ancestors). All you have to do is ask for a JFrame object in your program and you get all this. 418
10 import java.awt.*; import javax.swing.*; public class GUIDemo1 extends JFrame { GUIDemo1() { Container pane = getcontentpane(); JLabel label = new JLabel("Press [X] at top right corner to exit"); pane.add(label); public static void main (String[] args) { GUIDemo1 frm = new GUIDemo1(); frm.setsize(300, 100); frm.setvisible(true); 419
11 Buttons: Use new to construct a JButton object. Then, add the button to the frame's content pane (a container that represents the main rectangle of the frame). The add method of a content pane puts a JButton into the frame. To get a reference to the content pane, use the getcontentpane() method of the frame The JButton now will be displayed when the frame is displayed. Clicking on the button generates events, but so far the program does not respond to those events. 420
12 import java.awt.*; import javax.swing.*; public class ButtonDemo extends JFrame { JButton bchange; ButtonDemo() { Container pane = getcontentpane(); bchange = new JButton("Click Me!"); pane.add( bchange ); public static void main (String[] args) { ButtonDemo frm = new ButtonDemo(); frm.setsize(300, 100); frm.setvisible(true); 421
13 Layout manager: When you add() buttons (and other components) to a content pane, a layout manager automatically decides what size they will be and where they will go. This is convenient, because you can add components without worrying about the details. The layout manager is like a little artist inside the computer. You say what components you want and the layout manager lays them out in the picture. There are several kinds of layout managers. Each layout manager has a different style of positioning components. Usually there is a layout manager that will do the job you want. 422
14 Beispiel: GridLayout import java.awt.*; import javax.swing.*; public class LayoutManagerDemo extends JFrame { LayoutManagerDemo() { Container pane = getcontentpane(); setlayout(new GridLayout(3,2)); add(new JButton("1")); add(new JLabel("2")); add(new JButton("3")); add(new JLabel("4")); add(new JButton("5")); add(new JLabel("6")); public static void main (String[] args) { LayoutManagerDemo frm = new LayoutManagerDemo(); frm.setsize(200, 400); frm.setvisible(true); 423
15 Event listeners: When a GUI program is running, the user generates an event by interacting with a GUI component. For a program to respond to an event there must be an event listener object for it. When an event is generated by the GUI component, a method in the listener object is invoked to respond to the event. In order to respond to events, your program must: create an event listener object for the type of event register the listener object with the GUI component that generates the event 424
16 A WindowAdapter object is an event listener for window events. The class has listener methods for every frame event. Create a listener object: Extend WindowAdapter to create a child class For each type of event you need to respond to, override the corresponding method in WindowAdapter Use new to construct a listener object Register the listener with the frame object: Construct the frame object Use addwindowlistener() to register the listener with the frame Registering a listener with a frame means connecting the two objects so that events from one object (the frame) are sent to the other (the listener) 425
17 Class WindowAdapter 426
18 import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ListenerDemo extends JFrame { JButton bchange; ListenerDemo() { Container pane = getcontentpane(); bchange = new JButton("Click Me!"); pane.add(bchange); public static void main (String[] args) { ListenerDemo frm = new ListenerDemo(); WindowQuitter wquit = new WindowQuitter(); frm.addwindowlistener(wquit); frm.setsize(300, 100); frm.setvisible(true); class WindowQuitter extends WindowAdapter { public void windowclosing(windowevent e) { System.exit(0); 427
19 Button listeners: Different from window events, there is no ButtonAdapter class used as a base class for button listener objects. You need to define the complete class of a button listener from scratch. A button listener class must implement the ActionListener interface, that contains the single method: public void actionperformed(actionevent evt); The ActionEvent parameter is an Event object that represents an event (a button click). It contains information that can be used in responding to the event. Since ActionListener is an interface, you use it with a class that will implement the actionperformed() method. 428
20 import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ButtonDemo2 extends JFrame implements ActionListener { JButton bchange; public ButtonDemo2() { Container pane = getcontentpane(); pane.setlayout(new FlowLayout()); bchange = new JButton("Click Me!"); bchange.addactionlistener(this); pane.add(bchange); public void actionperformed(actionevent evt) { getcontentpane().setbackground(color.blue); repaint(); 429
21 public static void main (String[] args) { ButtonDemo2 frm = new ButtonDemo2(); WindowQuitter wquit = new WindowQuitter(); frm.addwindowlistener( wquit ); frm.setsize( 200, 150 ); frm.setvisible( true ); class WindowQuitter extends WindowAdapter { public void windowclosing( WindowEvent e ) { System.exit( 0 ); 430
22 Interface ActionListener 431
23 Two Buttons in one frame: A frame will hold two buttons, one labeled "Red" and the other "Green". The FlowLayout layout manager will be used so the buttons will be nicely positioned in the frame. When the button marked "Red" is clicked, the background will turn red When the button marked "Green" is clicked, the background will turn green 432
24 Problem: Event objects from both buttons are delivered to the same method We like the ActionEvent that is delivered to actionperformed() to say what should be done. Associate a different command with each button using setactioncommand(string command) Now each button sends its command (a String) as part of the ActionEvent when it is clicked. The actionperformed() method uses it to see what to do. 433
25 import java.awt.*; import java.awt.event.*; import javax.swing.*; public class TwoButtons extends JFrame implements ActionListener { JButtonredButton; JButtongrnButton; public TwoButtons() { redbutton = new JButton("Red"); grnbutton = new JButton("Green"); redbutton.setactioncommand( "red" ); grnbutton.setactioncommand( "green" ); getcontentpane().setlayout( new FlowLayout() ); getcontentpane().add( redbutton ); getcontentpane().add( grnbutton ); redbutton.addactionlistener( this ); grnbutton.addactionlistener( this ); 434
26 public void actionperformed(actionevent evt) { if ( evt.getactioncommand().equals( "red" ) ) getcontentpane().setbackground( Color.red ); else getcontentpane().setbackground( Color.green ); repaint(); public static void main (String[] args) { TwoButtons demo = new TwoButtons() ; WindowQuitter wquit = new WindowQuitter(); demo.addwindowlistener( wquit ); demo.setsize( 200, 150 ); demo.setvisible( true ); class WindowQuitter extends WindowAdapter { public void windowclosing( WindowEvent e ) { System.exit( 0 ); 435
27 Bradley Kjell s Java interactive Tutorial A JTextField is a box that contains text. The user can type text into the box and the program can get it and then use it as data. The program can write the results of a calculation to a JTextField. Application: Fat calculator. Class JSlider Radio buttons 436
CS 335 Lecture 06 Java Programming GUI and Swing
CS 335 Lecture 06 Java Programming GUI and Swing Java: Basic GUI Components Swing component overview Event handling Inner classes and anonymous inner classes Examples and various components Layouts Panels
More informationSwing. A Quick Tutorial on Programming Swing Applications
Swing A Quick Tutorial on Programming Swing Applications 1 MVC Model View Controller Swing is based on this design pattern It means separating the implementation of an application into layers or components:
More informationINTRODUCTION TO COMPUTER PROGRAMMING. Richard Pierse. Class 7: Object-Oriented Programming. Introduction
INTRODUCTION TO COMPUTER PROGRAMMING Richard Pierse Class 7: Object-Oriented Programming Introduction One of the key issues in programming is the reusability of code. Suppose that you have written a program
More informationProgramming with Java GUI components
Programming with Java GUI components Java includes libraries to provide multi-platform support for Graphic User Interface objects. The multi-platform aspect of this is that you can write a program on a
More informationGUIs with Swing. Principles of Software Construction: Objects, Design, and Concurrency. Jonathan Aldrich and Charlie Garrod Fall 2012
GUIs with Swing Principles of Software Construction: Objects, Design, and Concurrency Jonathan Aldrich and Charlie Garrod Fall 2012 Slides copyright 2012 by Jeffrey Eppinger, Jonathan Aldrich, William
More informationhttp://netbeans.org/kb/docs/java/gui-functionality.html?print=yes
Page 1 of 6 Introduction to GUI Building Contributed by Saleem Gul and Tomas Pavek, maintained by Ruth Kusterer and Irina Filippova This beginner tutorial teaches you how to create a simple graphical user
More informationThe Abstract Windowing Toolkit. Java Foundation Classes. Swing. In April 1997, JavaSoft announced the Java Foundation Classes (JFC).
The Abstract Windowing Toolkit Since Java was first released, its user interface facilities have been a significant weakness The Abstract Windowing Toolkit (AWT) was part of the JDK form the beginning,
More informationUsing A Frame for Output
Eventos Roteiro Frames Formatting Output Event Handling Entering Data Using Fields in a Frame Creating a Data Entry Field Using a Field Reading Data in an Event Handler Handling Multiple Button Events
More informationpublic class Craps extends JFrame implements ActionListener { final int WON = 0,LOST =1, CONTINUE = 2;
Lecture 15 The Game of "Craps" In the game of "craps" a player throws a pair of dice. If the sum on the faces of the pair of dice after the first toss is 7 or 11 the player wins; if the sum on the first
More information// Correntista. //Conta Corrente. package Banco; public class Correntista { String nome, sobrenome; int cpf;
// Correntista public class Correntista { String nome, sobrenome; int cpf; public Correntista(){ nome = "zé"; sobrenome = "Pereira"; cpf = 123456; public void setnome(string n){ nome = n; public void setsobrenome(string
More informationEssentials of the Java(TM) Programming Language, Part 1
Essentials of the Java(TM) Programming Language, Part 1 http://developer.java.sun.com/developer...ining/programming/basicjava1/index.html Training Index Essentials of the Java TM Programming Language:
More informationJava is commonly used for deploying applications across a network. Compiled Java code
Module 5 Introduction to Java/Swing Java is commonly used for deploying applications across a network. Compiled Java code may be distributed to different machine architectures, and a native-code interpreter
More informationHomework/Program #5 Solutions
Homework/Program #5 Solutions Problem #1 (20 points) Using the standard Java Scanner class. Look at http://natch3z.blogspot.com/2008/11/read-text-file-using-javautilscanner.html as an exampleof using the
More informationHow Scala Improved Our Java
How Scala Improved Our Java Sam Reid PhET Interactive Simulations University of Colorado http://spot.colorado.edu/~reids/ PhET Interactive Simulations Provides free, open source educational science simulations
More informationThe Basic Java Applet and JApplet
I2PUJ4 - Chapter 6 - Applets, HTML, and GUI s The Basic Java Applet and JApplet Rob Dempster robd@cs.ukzn.ac.za School of Computer Science University of KwaZulu-Natal Pietermaritzburg Campus I2PUJ4 - Chapter
More informationHow To Build A Swing Program In Java.Java.Netbeans.Netcode.Com (For Windows) (For Linux) (Java) (Javax) (Windows) (Powerpoint) (Netbeans) (Sun) (
Chapter 11. Graphical User Interfaces To this point in the text, our programs have interacted with their users to two ways: The programs in Chapters 1-5, implemented in Processing, displayed graphical
More informationDuring the process of creating ColorSwitch, you will learn how to do these tasks:
GUI Building in NetBeans IDE 3.6 This short tutorial guides you through the process of creating an application called ColorSwitch. You will build a simple program that enables you to switch the color of
More informationSchueler-Organisiertes Lernen am Beispiel von Grafischen Benutzer-Schnittstellen in Java Tag der Offenen Tür - GTS 2008
Schueler-Organisiertes Lernen am Beispiel von Grafischen Benutzer-Schnittstellen in Java Tag der Offenen Tür - GTS 2008 http://worgtsone.scienceontheweb.net/worgtsone/ - mailto: worgtsone @ hush.com Sa
More informationGraphical User Interfaces
M14_REGE1813_02_SE_C14.qxd 2/10/10 3:43 PM Page 822 Chapter14 Graphical User Interfaces 14.1 GUI Basics Graphical Input and Output with Option Panes Working with Frames Buttons, Text Fields, and Labels
More informationExtending Desktop Applications to the Web
Extending Desktop Applications to the Web Arno Puder San Francisco State University Computer Science Department 1600 Holloway Avenue San Francisco, CA 94132 arno@sfsu.edu Abstract. Web applications have
More informationArtificial Intelligence. Class: 3 rd
Artificial Intelligence Class: 3 rd Teaching scheme: 4 hours lecture credits: Course description: This subject covers the fundamentals of Artificial Intelligence including programming in logic, knowledge
More informationFachbereich Informatik und Elektrotechnik Java Swing. Advanced Java. Java Swing Programming. Programming in Java, Helmut Dispert
Java Swing Advanced Java Java Swing Programming Java Swing Design Goals The overall goal for the Swing project was: To build a set of extensible GUI components to enable developersto more rapidly develop
More informationGUI Event-Driven Programming
GUI Event-Driven Programming CSE 331 Software Design & Implementation Slides contain content by Hal Perkins and Michael Hotan 1 Outline User events and callbacks Event objects Event listeners Registering
More informationHow to Convert an Application into an Applet.
How to Convert an Application into an Applet. A java application contains a main method. An applet is a java program part of a web page and runs within a browser. I am going to show you three different
More informationEssentials of the Java Programming Language
Essentials of the Java Programming Language A Hands-On Guide by Monica Pawlan 350 East Plumeria Drive San Jose, CA 95134 USA May 2013 Part Number TBD v1.0 Sun Microsystems. Inc. All rights reserved If
More informationAdvanced Network Programming Lab using Java. Angelos Stavrou
Advanced Network Programming Lab using Java Angelos Stavrou Table of Contents A simple Java Client...3 A simple Java Server...4 An advanced Java Client...5 An advanced Java Server...8 A Multi-threaded
More informationGUI Components: Part 2
GUI Components: Part 2 JComboBox and Using an Anonymous Inner Class for Event Handling A combo box (or drop-down list) enables the user to select one item from a list. Combo boxes are implemented with
More informationTutorial Reference Manual. Java WireFusion 4.1
Tutorial Reference Manual Java WireFusion 4.1 Contents INTRODUCTION...1 About this Manual...2 REQUIREMENTS...3 User Requirements...3 System Requirements...3 SHORTCUTS...4 DEVELOPMENT ENVIRONMENT...5 Menu
More informationHow To Write A Program For The Web In Java (Java)
21 Applets and Web Programming As noted in Chapter 2, although Java is a general purpose programming language that can be used to create almost any type of computer program, much of the excitement surrounding
More informationTutorial: Time Of Day Part 2 GUI Design in NetBeans
Tutorial: Time Of Day Part 2 GUI Design in NetBeans October 7, 2010 Author Goals Kees Hemerik / Gerard Zwaan Getting acquainted with NetBeans GUI Builder Illustrate the separation between GUI and computation
More informationInformatik II. // ActionListener hinzufügen btnconvert.addactionlistener(this); super.setdefaultcloseoperation(jframe.
Universität Augsburg, Institut für Informatik Sommersemester 2006 Prof. Dr. Werner Kießling 20. Juli. 2006 M. Endres, A. Huhn, T. Preisinger Lösungsblatt 11 Aufgabe 1: Währungsrechner CurrencyConverter.java
More informationfile://c:\dokumente und Einstellungen\Marco Favorito\Desktop\ScanCmds.html
file:c:\dokumente und Einstellungen\Marco Favorito\Desktop\ScanCmds.html Seite 1 von 5 ScanCmds.java ------------------------------------------------------------------------------- ScanCmds Demontration
More informationAssignment # 2: Design Patterns and GUIs
CSUS COLLEGE OF ENGINEERING AND COMPUTER SCIENCE Department of Computer Science CSc 133 Object-Oriented Computer Graphics Programming Spring 2014 John Clevenger Assignment # 2: Design Patterns and GUIs
More informationHere's the code for our first Applet which will display 'I love Java' as a message in a Web page
Create a Java Applet Those of you who purchased my latest book, Learn to Program with Java, know that in the book, we create a Java program designed to calculate grades for the English, Math and Science
More informationmethod is never called because it is automatically called by the window manager. An example of overriding the paint() method in an Applet follows:
Applets - Java Programming for the Web An applet is a Java program designed to run in a Java-enabled browser or an applet viewer. In a browser, an applet is called into execution when the APPLET HTML tag
More informationFondamenti di Java. Introduzione alla costruzione di GUI (graphic user interface)
Fondamenti di Java Introduzione alla costruzione di GUI (graphic user interface) component - container - layout Un Container contiene [0 o +] Components Il Layout specifica come i Components sono disposti
More informationSoftware Design: Figures
Software Design: Figures Today ColorPicker Layout Manager Observer Pattern Radio Buttons Prelimiary Discussion Exercise 5 ColorPicker They don't teach you the facts of death, Your mum and dad. They give
More informationCallbacks. Callbacks Copyright 2007 by Ken Slonneger 1
Callbacks Callbacks refer to a mechanism in which a library or utility class provides a service to clients that are unknown to it when it is defined. Suppose, for example, that a server class creates a
More informationJava GUI Programming. Building the GUI for the Microsoft Windows Calculator Lecture 2. Des Traynor 2005
Java GUI Programming Building the GUI for the Microsoft Windows Calculator Lecture 2 Des Traynor 2005 So, what are we up to Today, we are going to create the GUI for the calculator you all know and love.
More informationUsing NetBeans IDE for Desktop Development. Geertjan Wielenga http://blogs.sun.com/geertjan
Using NetBeans IDE for Desktop Development Geertjan Wielenga http://blogs.sun.com/geertjan Agenda Goals Design: Matisse GUI Builder Medium Applications: JSR-296 Tooling Large Applications: NetBeans Platform
More informationMouse Event Handling (cont.)
GUI Components: Part II Mouse Event Handling (cont.) Each mouse event-handling method receives a MouseEvent object that contains information about the mouse event that occurred, including the x- and y-coordinates
More informationSkills and Topics for TeenCoder: Java Programming
Skills and Topics for TeenCoder: Java Programming Our Self-Study Approach Our courses are self-study and can be completed on the student's own computer, at their own pace. You can steer your student in
More informationDeveloping GUI Applications: Architectural Patterns Revisited
Developing GUI Applications: Architectural Patterns Revisited A Survey on MVC, HMVC, and PAC Patterns Alexandros Karagkasidis karagkasidis@gmail.com Abstract. Developing large and complex GUI applications
More informationDemo: Embedding Windows Presentation Foundation elements inside a Java GUI application. Version 7.3
Demo: Embedding Windows Presentation Foundation elements inside a Java GUI application Version 7.3 JNBridge, LLC www.jnbridge.com COPYRIGHT 2002 2015 JNBridge, LLC. All rights reserved. JNBridge is a registered
More informationKarsten Lentzsch JGoodies SWING WITH STYLE
Karsten Lentzsch JGoodies SWING WITH STYLE JGoodies: Karsten Lentzsch Open source Swing libraries Example applications Consultant for Java desktop Design assistance Training for visual design and implementation
More informationCSS 543 Program 3: Online Tic-Tac-Toe Game Professor: Munehiro Fukuda Due date: see the syllabus
CSS 543 Program 3: Online Tic-Tac-Toe Game Professor: Munehiro Fukuda Due date: see the syllabus 1. Purpose This assignment exercises how to write a peer-to-peer communicating program using non-blocking
More informationIllustration 1: An applet showing constructed responses in an intuitive mode. Note the misprint!
Applets in Java using NetBeans as an IDE (Part 1) C.W. David Department of Chemistry University of Connecticut Storrs, CT 06269-3060 Carl.David@uconn.edu We are interested in creating a teaching/testing
More informationJIDE Action Framework Developer Guide
JIDE Action Framework Developer Guide Contents PURPOSE OF THIS DOCUMENT... 1 WHAT IS JIDE ACTION FRAMEWORK... 1 PACKAGES... 3 MIGRATING FROM EXISTING APPLICATIONS... 3 DOCKABLEBARMANAGER... 9 DOCKABLE
More informationGUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT COURSE CURRICULUM COURSE TITLE: ADVANCE JAVA PROGRAMMING (COURSE CODE: 3360701)
GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT COURSE CURRICULUM COURSE TITLE: ADVANCE JAVA PROGRAMMING (COURSE CODE: 3360701) Diploma Programme in which this course is offered Computer Engineering/
More information@ - Internal # - External @- Online TH PR OR TW TOTAL HOURS 04 --- 04 03 100 50# --- 25@ 175
COURSE NAME : COMPUTER ENGINEERING GROUP COURSE CODE SEMESTER SUBJECT TITLE : CO/CM/IF/CD : SIXTH : ADVANCED JAVA PROGRAMMING SUBJECT CODE : Teaching and Examination Scheme: @ - Internal # - External @-
More informationpublic class demo1swing extends JFrame implements ActionListener{
import java.io.*; import java.net.*; import java.io.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class demo1swing extends JFrame implements ActionListener JButton demodulacion;
More informationPrinciples of Software Construction: Objects, Design and Concurrency. GUIs with Swing. toad 15-214. Spring 2013
Principles of Software Construction: Objects, Design and Concurrency GUIs with Swing 15-214 toad Spring 2013 Christian Kästner Charlie Garrod School of Computer Science 2012-13 C Garrod, C Kästner, J Aldrich,
More informationCourse/Year W080/807 Expected Solution Subject: Software Development to Question No: 1
Subject: Software Development to Question No: 1 Page 1 of 2 Allocation: 33 marks (a) (i) A layout manager is an object that implements the LayoutManager interface and determines the size and position of
More informationCours de Java. Sciences-U Lyon. Java - Introduction Java - Fondamentaux Java Avancé. http://www.rzo.free.fr
Cours de Java Sciences-U Lyon Java - Introduction Java - Fondamentaux Java Avancé http://www.rzo.free.fr Pierre PARREND 1 Octobre 2004 Sommaire Java Introduction Java Fondamentaux Java Avancé GUI Graphical
More informationEvent processing in Java: what happens when you click?
Event processing in Java: what happens when you click? Alan Dix In the HCI book chapter 8 (fig 8.5, p. 298), notification-based user interface programming is described. Java uses this paradigm and you
More informationMedientechnik. Übung MVC
Medientechnik Übung MVC Heute Model-View-Controller (MVC) Model programmieren Programmlogik Programmdaten Controller programmieren GUI Model Observer-Pattern Observable (Model) verwaltet Daten Observer
More informationKonzepte objektorientierter Programmierung
Konzepte objektorientierter Programmierung Prof. Dr. Peter Müller Werner Dietl Software Component Technology Exercises 5: Frameworks Wintersemester 05/06 2 Homework 1 Observer Pattern From: Gamma, Helm,
More informationAnalysis Of Source Lines Of Code(SLOC) Metric
Analysis Of Source Lines Of Code(SLOC) Metric Kaushal Bhatt 1, Vinit Tarey 2, Pushpraj Patel 3 1,2,3 Kaushal Bhatt MITS,Datana Ujjain 1 kaushalbhatt15@gmail.com 2 vinit.tarey@gmail.com 3 pushpraj.patel@yahoo.co.in
More informationImplementação. Interfaces Pessoa Máquina 2010/11. 2009-11 Salvador Abreu baseado em material Alan Dix. Thursday, June 2, 2011
Implementação Interfaces Pessoa Máquina 2010/11 2009-11 baseado em material Alan Dix 1 Windowing systems Architecture Layers Higher level Tool UI Toolkit (Widgets) Window System OS Application Hardware
More informationObject Oriented Programming with Java. School of Computer Science University of KwaZulu-Natal
Object Oriented Programming with Java School of Computer Science University of KwaZulu-Natal January 30, 2006 2 Object Oriented Programming with Java Notes for the Computer Science Module Object Oriented
More informationHow To Use The Command Pattern In Java.Com (Programming) To Create A Program That Is Atomic And Is Not A Command Pattern (Programmer)
CS 342: Object-Oriented Software Development Lab Command Pattern and Combinations David L. Levine Christopher D. Gill Department of Computer Science Washington University, St. Louis levine,cdgill@cs.wustl.edu
More informationTema: Encriptación por Transposición
import java.awt.*; import java.awt.event.*; import javax.swing.*; public class PrincipalSO extends JApplet implements ActionListener { // Declaración global JLabel lblclave, lblencriptar, lblencriptado,
More informationNexawebホワイトペーパー. Developing with Nexaweb ~ Nexaweb to Improve Development Productivity and Maintainability
Nexawebホワイトペーパー Developing with Nexaweb ~ Nexaweb to Improve Development Productivity and Maintainability Nexaweb Technologies, Inc. February 2012 Overview Many companies today are creating rich internet
More informationJava GUI Programming
Java GUI Programming Sean P. Strout (sps@cs.rit.edu) Robert Duncan (rwd@cs.rit.edu) 10/24/2005 Java GUI Programming 1 Java has standard packages for creating custom Graphical User Interfaces What is a
More informationEclipse with Mac OSX Getting Started Selecting Your Workspace. Creating a Project.
Eclipse with Mac OSX Java developers have quickly made Eclipse one of the most popular Java coding tools on Mac OS X. But although Eclipse is a comfortable tool to use every day once you know it, it is
More informationLAYOUT MANAGERS. Layout Managers Page 1. java.lang.object. java.awt.component. java.awt.container. java.awt.window. java.awt.panel
LAYOUT MANAGERS A layout manager controls how GUI components are organized within a GUI container. Each Swing container (e.g. JFrame, JDialog, JApplet and JPanel) is a subclass of java.awt.container and
More informationDev Articles 05/25/07 11:07:33
Java Crawling the Web with Java Contributed by McGraw Hill/Osborne 2005 06 09 Access Your PC from Anywhere Download Your Free Trial Take your office with you, wherever you go with GoToMyPC. It s the remote
More informationProject Builder for Java. (Legacy)
Project Builder for Java (Legacy) Contents Introduction to Project Builder for Java 8 Organization of This Document 8 See Also 9 Application Development 10 The Tool Template 12 The Swing Application Template
More informationSyllabus for CS 134 Java Programming
- Java Programming Syllabus Page 1 Syllabus for CS 134 Java Programming Computer Science Course Catalog 2000-2001: This course is an introduction to objectoriented programming using the Java language.
More informationThe class JOptionPane (javax.swing) allows you to display a dialog box containing info. showmessagedialog(), showinputdialog()
// Fig. 2.8: Addition.java An addition program import javax.swing.joptionpane; public class Addition public static void main( String args[] ) String firstnumber, secondnumber; int number1, number2, sum;
More informationLab 1A. Create a simple Java application using JBuilder. Part 1: make the simplest Java application Hello World 1. Start Jbuilder. 2.
Lab 1A. Create a simple Java application using JBuilder In this lab exercise, we ll learn how to use a Java integrated development environment (IDE), Borland JBuilder 2005, to develop a simple Java application
More informationLab 9. Spam, Spam, Spam. Handout 11 CSCI 134: Spring, 2015. To gain experience with Strings. Objective
Lab 9 Handout 11 CSCI 134: Spring, 2015 Spam, Spam, Spam Objective To gain experience with Strings. Before the mid-90s, Spam was a canned meat product. These days, the term spam means just one thing unwanted
More information8 CREATING FORM WITH FORM WIZARD AND FORM DESIGNER
8 CREATING FORM WITH FORM WIZARD AND FORM DESIGNER 8.1 INTRODUCTION Forms are very powerful tool embedded in almost all the Database Management System. It provides the basic means for inputting data for
More informationMaximizing the Use of Slide Masters to Make Global Changes in PowerPoint
Maximizing the Use of Slide Masters to Make Global Changes in PowerPoint This document provides instructions for using slide masters in Microsoft PowerPoint. Slide masters allow you to make a change just
More informationLecture VII JAVA SWING GUI TUTORIAL
2. First Step: JFrame Lecture VII Page 1 Lecture VII JAVA SWING GUI TUTORIAL These notes are based on the excellent book, Core Java, Vol 1 by Horstmann and Cornell, chapter 7, graphics programming. Introduction
More informationJiST Graphical User Interface Event Viewer. Mark Fong mjf21@cornell.edu
JiST Graphical User Interface Event Viewer Mark Fong mjf21@cornell.edu Table of Contents JiST Graphical User Interface Event Viewer...1 Table of Contents...2 Introduction...3 What it does...3 Design...3
More informationModel-View-Controller (MVC) Design Pattern
Model-View-Controller (MVC) Design Pattern Computer Science and Engineering College of Engineering The Ohio State University Lecture 23 Motivation Basic parts of any application: Data being manipulated
More informationHow to Develop Accessible Linux Applications
Sharon Snider Copyright 2002 by IBM Corporation v1.1, 2002 05 03 Revision History Revision v1.1 2002 05 03 Revised by: sds Converted to DocBook XML and updated broken links. Revision v1.0 2002 01 28 Revised
More informationJava Appletek II. Applet GUI
THE INTERNET,mapped on the opposite page, is a scalefree network in that Java Appletek II. dis.'~tj port,from BYALBERTU\SZLOBARABASI ANDERICBONABEAU THE INTERNET,mapped on the opposite page, is a scalefree
More informationMicrosoft PowerPoint 2010 Computer Jeopardy Tutorial
Microsoft PowerPoint 2010 Computer Jeopardy Tutorial 1. Open up Microsoft PowerPoint 2010. 2. Before you begin, save your file to your H drive. Click File > Save As. Under the header that says Organize
More informationVisual Basic Programming. An Introduction
Visual Basic Programming An Introduction Why Visual Basic? Programming for the Windows User Interface is extremely complicated. Other Graphical User Interfaces (GUI) are no better. Visual Basic provides
More informationManagement Information Systems 260 Web Programming Fall 2006 (CRN: 42459)
Management Information Systems 260 Web Programming Fall 2006 (CRN: 42459) Class Time: 6:00 8:05 p.m. (T,Th) Venue: WSL 5 Web Site: www.pbvusd.net/mis260 Instructor Name: Terrell Tucker Office: BDC 127
More informationObject-Oriented Programming and Data Structures
Second AP * Edition with GridWorld Java Methods Object-Oriented Programming and Data Structures Maria Litvin Phillips Academy, Andover, Massachusetts Gary Litvin Skylight Software, Inc. Skylight Publishing
More informationExplore Oakville How To Perform a Search and Navigate a Map
Explore Oakville How To Perform a Search and Navigate a Map The information in this article applies to: Item: Explore Oakville Version: 2013 Hardware/Software: Software Contents of This Tutorial: Searching
More informationMapping to the Windows Presentation Framework
Mapping to the Windows Presentation Framework This section maps the main IFML concepts to the.net Windows Presentation Framework (WFP). Windows Presentation Framework (WPF) is a part of.net Framework by
More informationKaleidaGraph Quick Start Guide
KaleidaGraph Quick Start Guide This document is a hands-on guide that walks you through the use of KaleidaGraph. You will probably want to print this guide and then start your exploration of the product.
More informationMaking Visio Diagrams Come Alive with Data
Making Visio Diagrams Come Alive with Data An Information Commons Workshop Making Visio Diagrams Come Alive with Data Page Workshop Why Add Data to A Diagram? Here are comparisons of a flow chart with
More informationJIDE Common Layer Developer Guide (Open Source Project)
JIDE Common Layer Developer Guide (Open Source Project) Contents PURPOSE OF THIS DOCUMENT... 4 WHY USING COMPONENTS... 4 WHY DO WE OPEN SOURCE... 5 HOW TO LEARN JIDE COMMON LAYER... 5 PACKAGE STRUCTURE...
More informationMATLAB. Creating Graphical User Interfaces Version 6. The Language of Technical Computing. Computation. Visualization. Programming
MATLAB The Language of Technical Computing Computation Visualization Programming Creating Graphical User Interfaces Version 6 How to Contact The MathWorks: www.mathworks.com comp.soft-sys.matlab support@mathworks.com
More informationLösningsförslag till tentamen 121217
Uppgift 1 Lösningsförslag till tentamen 121217 a) Utskriften blir: a = 5 och b = 10 a = 5 och b = 10 b) Utskriften blir 1 2 3 4 5 5 2 3 4 1 c) Utskriften blir 321 Uppgift 2 Med användning av dialogrutor:
More informationAutomated Data Collection for Usability Evaluation in Early Stages of Application Development
Automated Data Collection for Usability Evaluation in Early Stages of Application Development YONGLEI TAO School of Computing and Information Systems Grand Valley State University Allendale, MI 49401 USA
More informationyour provider for business web solutions Desktop-Feeling garantiert - Wie Ihre Web-Applikation alle Erwartungen erfüllt! Basel, 06.04.
Desktop-Feeling garantiert - Wie Ihre Web-Applikation alle Erwartungen erfüllt! Basel, 06.04.2011 Welcome Daniel Grob und Andreas Henle Canoo Engineering AG, Basel Rich Internet Applications Products,
More informationWindows Basics. Developed by: D. Cook
Windows Basics Developed by: D. Cook User Interface Hardware and Software Monitor Keyboard Mouse User friendly vs. MS-DOS GUI (graphical user interface) Launching Windows 2000 (XP) CTRL-ALT-DEL Desktop
More informationFundamentals of Java Programming
Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors
More informationCreating Fill-able Forms using Acrobat 8.0: Part 1
Creating Fill-able Forms using Acrobat 8.0: Part 1 The first step in creating a fill-able form in Adobe Acrobat is to generate the form with all its formatting in a program such as Microsoft Word. Then
More informationManaging Your Desktop with Exposé, Spaces, and Other Tools
CHAPTER Managing Your Desktop with Exposé, Spaces, and Other Tools In this chapter Taking Control of Your Desktop 266 Managing Open Windows with Exposé 266 Creating, Using, and Managing Spaces 269 Mac
More informationUsing Kid Pix Deluxe 3 (Windows)
Using Kid Pix Deluxe 3 (Windows) KidPix Deluxe 3 is a multimedia software program that is especially effective for use with primary level students. Teachers and students can create animated slide presentations
More informationMicrosoft Office PowerPoint 2003. Identify components of the PowerPoint window. Tutorial 1 Creating a Presentation
Microsoft Office PowerPoint 2003 Tutorial 1 Creating a Presentation 1 Identify components of the PowerPoint window You will recognize some of the features of the PowerPoint window that are common to Windows
More informationBuilding Applications With DUIM
Building Applications With DUIM Release 1.0 Dylan Hackers January 28, 2016 CONTENTS 1 Copyright 3 2 Preface 5 2.1 About this manual............................................ 5 2.2 Running examples in
More informationMicrosoft Office PowerPoint 2003. Creating a new presentation from a design template. Creating a new presentation from a design template
Microsoft Office PowerPoint 2003 Tutorial 2 Applying and Modifying Text and Graphic Objects 1 Creating a new presentation from a design template Click File on the menu bar, and then click New Click the
More information