NOTE: This supplement can be used after Chapter 6, Containers and Layout Managers.
|
|
- Phoebe Collins
- 7 years ago
- Views:
Transcription
1 Creating Internal Frames NOTE: This supplement can be used after Chapter 6, Containers and Layout Managers. You can create multiple windows as shown in Example 11.12, Creating Multiple Windows, in Chapter 11, Creating User Interfaces, in Introduction to Java Programming with JBuilder 4/5/6. Java also allows you to use the JInternalFrame class to create windows within a window. This user interface is commonly known as multiple document interface or MDI. This user interface was quite popular and used in the earlier versions of many popular Windows software, but it is now rarely used. For this reason, this feature is not covered in the main text. Instead it is introduced in this supplement for your reference. The JInternalFrame class is almost the same as the external JFrame class. The components are added to the internal frame in the same way as they are added to the external frame. The internal frame can have menus, the title, the Close icon, the Minimize icon, and the Maximize icon just like the external frame. The following are the major differences: 1. JInternalFrame extends JComponent, and JFrame extends the AWT Frame class. Therefore, JInternalFrame is a swing lightweight component, and JFrame is a swing heavyweight component. 2. Both JInternalFrame and JFrame are used to hold other components. JFrame is a top-level window component, and JInternalFrame must be contained inside a JDesktopPane of a JFrame or a JApplet. Here are the steps to create an internal frame inside another window: 1. Use a JFrame or a JApplet to be the outer window. 2. Create a JDesktopPane and add it to the content pane of a JFrame or JApplet. Usually, the JDesktopPane is added to the center of the content pane. 3. Create a JInternalFrame and add it to the JDesktopPane using the add method. 4. Use the setvisible(true) method to display the internal frame. Example Creating Internal Frames This example creates internal frames to display flags in an applet. You can select flags from the Flags menu. Clicking a menu item causes a flag to be 133
2 displayed in an internal frame, as shown in Figure 1. The source code of the example is shown in Listing 1. Figure 1 The flag image is displayed in an internal frame. Listing 1: InternalFrameApplet.java package internalframedemo; import java.awt.*; import java.awt.event.*; import java.applet.*; import javax.swing.*; import imageviewerdemo.imageviewer; public class InternalFrameApplet extends JApplet { boolean isstandalone = false; JMenuBar jmenubar1 = new JMenuBar(); JMenu jmenu1 = new JMenu(); JMenuItem jmius = new JMenuItem(); JMenuItem jmicanada = new JMenuItem(); ImageViewer imageviewer = new ImageViewer(); // Create JDesktopPane to hold the internal frame JDesktopPane desktop = new JDesktopPane(); JInternalFrame internalframe = new JInternalFrame("US", true, true, true, true); // Create images Image imageus = ImageViewer.createImage( "../image/us.gif", this); Image imagecanada = ImageViewer.createImage( "../image/ca.gif", this); // Create image icons ImageIcon imageusicon = ImageViewer.createImageIcon( "../image/usicon.gif", this); ImageIcon imagecanadaicon = ImageViewer.createImageIcon( "../image/caicon.gif", this); 134
3 /**Get a parameter value*/ public String getparameter(string key, String def) { return isstandalone? System.getProperty(key, def) : (getparameter(key)!= null? getparameter(key) : def); /**Construct the applet*/ public InternalFrameApplet() { /**Initialize the applet*/ public void init() { try { jbinit(); catch(exception e) { e.printstacktrace(); /**Component initialization*/ private void jbinit() throws Exception { desktop.add(internalframe); this.setsize(new Dimension(400,300)); this.getcontentpane().add(desktop, BorderLayout.CENTER); imageviewer.setimage(imageus); internalframe.setframeicon(imageusicon); internalframe.getcontentpane().add(imageviewer); internalframe.setlocation(20, 20); internalframe.setsize(100, 100); internalframe.setvisible(true); jmenubar1.add(jmenu1); jmenu1.add(jmius); jmenu1.add(jmicanada); jmenu1.settext("flags"); jmius.settext("us"); jmicanada.settext("canada"); this.setjmenubar(jmenubar1); jmius.addactionlistener(new java.awt.event.actionlistener() { public void actionperformed(actionevent e) { jmius_actionperformed(e); ); jmicanada.addactionlistener(new java.awt.event.actionlistener() { public void actionperformed(actionevent e) { jmicanada_actionperformed(e); ); 135
4 /**Get Applet information*/ public String getappletinfo() { return "Applet Information"; /**Get parameter info*/ public String[][] getparameterinfo() { return null; /**Main method*/ public static void main(string[] args) { InternalFrameApplet applet = new InternalFrameApplet(); applet.isstandalone = true; JFrame frame = new JFrame(); //EXIT_ON_CLOSE == 3 frame.setdefaultcloseoperation(3); frame.settitle("internal Frame Demo"); frame.getcontentpane().add(applet, BorderLayout.CENTER); applet.init(); applet.start(); frame.setsize(400,320); Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); frame.setlocation((d.width - frame.getsize().width) / 2, (d.height - frame.getsize().height) / 2); frame.setvisible(true); //static initializer for setting look & feel static { try { //UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); //UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); catch(exception e) { void jmius_actionperformed(actionevent e) { imageviewer.setimage(imageus); internalframe.setframeicon(imageusicon); internalframe.settitle("us"); void jmicanada_actionperformed(actionevent e) { imageviewer.setimage(imagecanada); internalframe.setframeicon(imagecanadaicon); internalframe.settitle("canada"); Example Review 136
5 As shown in Figure 1, an internal frame looks similar to an external frame. Internal frames can be used just like an external frame, except that internal frames are always placed inside a JDesktopPane. JDesktopPane is a subclass of JLayeredPane. Since JDesktopPane is also a subclass of JComponent, it can be placed into the content pane of a JFrame or a JApplet. The ImageViewer class was presented in Example 4.1, Creating an Image Viewer. Its static methods creatimage and createimageicon create instances of Image and ImageIcon, respectively. The properties of the JInternalFrame and JFrame are very similar. You can set a title, an internal frame icon, size, and visible for an internal frame. You may modify this example to add menus to the internal frame too. 137
The 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 informationCS 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 information5.17 GUI. Xiaoyi Jiang Informatik I Grundlagen der Programmierung
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
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 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 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 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 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 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 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 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 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 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 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 informationDHBW Karlsruhe, Vorlesung Programmieren, Remote Musterlösungen
DHBW Karlsruhe, Vorlesung Programmieren, Remote Musterlösungen Aufgabe 1 RMI - TimeService public interface TimeServerInterface extends Remote { public String gettime() throws RemoteException; import java.util.date;
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 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 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 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 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 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 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 informationJIDE Docking Framework Developer Guide
JIDE Docking Framework Developer Guide Contents PURPOSE OF THIS DOCUMENT... 1 WHAT IS JIDE DOCKING FRAMEWORK... 2 HOW TO USE JIDE DOCKING FRAMEWORK... 2 UNDERSTANDING THE DOCKINGMANAGER... 2 INTEGRATION
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 informationJava SE 6 Update 10. la piattaforma Java per le RIA. Corrado De Bari. Sun Microsystems Italia Spa. Software & Java Ambassador
Java SE 6 Update 10 & JavaFX: la piattaforma Java per le RIA Corrado De Bari Software & Java Ambassador Sun Microsystems Italia Spa 1 Agenda What's news in Java Runtime Environment JavaFX Technology Key
More information11. Applets, normal window applications, packaging and sharing your work
11. Applets, normal window applications, packaging and sharing your work In this chapter Converting Full Screen experiments into normal window applications, Packaging and sharing applications packaging
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 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 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 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 informationwww.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk
CS506 Web Design and Development Solved Online Quiz No. 01 Which of the following is a general purpose container? JFrame Dialog JPanel JApplet Which of the following package needs to be import while handling
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 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 informationAnimazione in Java. Animazione in Java. Problemi che possono nascere, e loro soluzione. Marco Ronchetti Lezione 1
Animazione in Java Problemi che possono nascere, e loro soluzione Animazione in Java Application MyFrame (JFrame) ClockPanel (JPanel) 1 public class ClockPanel extends JPanel { public ClockPanel void paintcomponent(graphics
More informationPart IV: Java Database Programming
Part IV: Java Database Programming This part of the book discusses how to use Java to develop database projects. You will learn JDBC interfaces and classes, create and process SQL statements, obtaining
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 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 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 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 informationChapter 2 Introduction to Java programming
Chapter 2 Introduction to Java programming 1 Keywords boolean if interface class true char else package volatile false byte final switch while throws float private case return native void protected break
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 information"New Java course material and available pool of.ppt presentations"
"New Java course material and available pool of.ppt presentations" D. Pešović, M. Ivanović, Ž. Komlenov University of Novi Sad September, 2007 1 AGENDA 1. SubProject site current state 2. Collected material
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 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 informationFirst Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science
First Java Programs V. Paúl Pauca Department of Computer Science Wake Forest University CSC 111D Fall, 2015 Hello World revisited / 8/23/15 The f i r s t o b l i g a t o r y Java program @author Paul Pauca
More informationJava Applets. CSE219, Computer Science III Stony Brook University http://www.cs.stonybrook.edu/~cse219
Java Applets CSE219, Computer Science III Stony Brook University http://www.cs.stonybrook.edu/~cse219 1 Java Applets When you browse the Web, you frequently see the graphical user interface and animation
More informationIntroduction to Java Applets (Deitel chapter 3)
Introduction to Java Applets (Deitel chapter 3) 1 2 Plan Introduction Sample Applets from the Java 2 Software Development Kit Simple Java Applet: Drawing a String Drawing Strings and Lines Adding Floating-Point
More informationSyllabus. Java programs for creating applets for display of images, text and animation. Input output and random files programs in java
WEB DEVELOPMENT LAB Syllabus Java programs using classes &objects and various control constructs such as loops etc, and structure such as arrays, structures and functions. Java programs for creating applets
More informationOpenOffice.org Extensions development in Java with NetBeans in practise. Jürgen Schmidt OpenOffice.org Sun Microsystems, Inc.
OpenOffice.org Extensions development in Java with NetBeans in practise Jürgen Schmidt OpenOffice.org Sun Microsystems, Inc. 1 OpenOffice.org Extensions development in Java with NetBeans in practise Motivation
More informationThere are some important differences between an applet and a standalone Java application, including the following:
JAVA - APPLET BASICS Copyright tutorialspoint.com An applet is a Java program that runs in a Web browser. An applet can be a fully functional Java application because it has the entire Java API at its
More informationIntroduction to the Java Programming Language
Software Design Introduction to the Java Programming Language Material drawn from [JDK99,Sun96,Mitchell99,Mancoridis00] Java Features Write Once, Run Anywhere. Portability is possible because of Java virtual
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 informationAppendix B Task 2: questionnaire and artefacts
Appendix B Task 2: questionnaire and artefacts This section shows the questionnaire, the UML class and sequence diagrams, and the source code provided for the task 1 (T2) Buy a Ticket Unsuccessfully. It
More informationLecture 15: Pluggable Look & Feels. CS 338: Graphical User Interfaces. Dario Salvucci, Drexel University.
Lecture 15: Pluggable Look & Feels CS 338: Graphical User Interfaces. Dario Salvucci, Drexel University. 1 What is a Pluggable Look and Feel? We'll be talking about Pluggable Look and Feels We'll look
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 informationFachbereich Informatik und Elektrotechnik Java Applets. Programming in Java. Java Applets. Programming in Java, Helmut Dispert
Java Applets Programming in Java Java Applets Java Applets applet= app = application snippet = Anwendungsschnipsel An applet is a small program that is intended not to be run on its own, but rather to
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 informationAn Overview of Java. overview-1
An Overview of Java overview-1 Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2
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 informationUsing WINK to create custom animated tutorials
Using WINK to create custom animated tutorials A great way for students and teachers alike to learn how to use new software is to see it demonstrated and to reinforce the lesson by reviewing the demonstration.
More informationTABLE OF CONTENTS...2 INTRODUCTION...3 APPLETS AND APPLICATIONS...3 JAVABEANS...4 EXCEPTION HANDLING...5 JAVA DATABASE CONNECTIVITY (JDBC)...
Advanced Features Trenton Computer Festival May 1 sstt & 2 n d,, 2004 Michael P.. Redlich Senior Research Technician ExxonMobil Research & Engineering michael..p..redlich@exxonmobil..com Table of Contents
More informationA TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION
A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION Tao Chen 1, Tarek Sobh 2 Abstract -- In this paper, a software application that features the visualization of commonly used
More informationAssignment No.3. /*-- Program for addition of two numbers using C++ --*/
Assignment No.3 /*-- Program for addition of two numbers using C++ --*/ #include class add private: int a,b,c; public: void getdata() couta; cout
More informationWeb Development and Core Java Lab Manual V th Semester
Web Development and Core Java Lab Manual V th Semester DEPT. OF COMPUTER SCIENCE AND ENGINEERING Prepared By: Kuldeep Yadav Assistant Professor, Department of Computer Science and Engineering, RPS College
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 informationWRITING DATA TO A BINARY FILE
WRITING DATA TO A BINARY FILE TEXT FILES VS. BINARY FILES Up to now, we have looked at how to write and read characters to and from a text file. Text files are files that contain sequences of characters.
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 informationICOM 4015: Advanced Programming
ICOM 4015: Advanced Programming Lecture 10 Reading: Chapter Ten: Inheritance Copyright 2009 by John Wiley & Sons. All rights reserved. Chapter 10 Inheritance Chapter Goals To learn about inheritance To
More informationSection 1: Ribbon Customization
WHAT S NEW, COMMON FEATURES IN OFFICE 2010 2 Contents Section 1: Ribbon Customization... 4 Customizable Ribbon... 4 Section 2: File is back... 5 Info Tab... 5 Recent Documents Tab... 7 New Documents Tab...
More informationCS108, Stanford Handout #33. Sockets
CS108, Stanford Handout #33 Fall, 2007-08 Nick Parlante Sockets Sockets Sockets make network connections between machines, but you just read/write/block on them like there were plain file streams. The
More informationLAB 1. Familiarization of Rational Rose Environment And UML for small Java Application Development
LAB 1 Familiarization of Rational Rose Environment And UML for small Java Application Development OBJECTIVE AND BACKGROUND The purpose of this first UML lab is to familiarize programmers with Rational
More informationUsing Eclipse to Run Java Programs
Using Eclipse to Run Java Programs Downloading and Installing Eclipse Here s how: 1. Visit www.eclipse.org. 2. On that Web site, follow the links for downloading Eclipse. Be sure to pick the version that
More information1 Hour, Closed Notes, Browser open to Java API docs is OK
CSCI 143 Exam 2 Name 1 Hour, Closed Notes, Browser open to Java API docs is OK A. Short Answer For questions 1 5 credit will only be given for a correct answer. Put each answer on the appropriate line.
More informationATSBA: Advanced Technologies Supporting Business Areas
ATSBA: Advanced Technologies Supporting Business Areas Software Engineering 1 Introduction 1 1 Introduction - What is Software Engineering? 1 Introduction - What is Software Engineering? 1.1 Definitions
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 information16.1 DataFlavor. 16.1.1 DataFlavor Methods. Variables
In this chapter: DataFlavor Transferable Interface ClipboardOwner Interface Clipboard StringSelection UnsupportedFlavorException Reading and Writing the Clipboard 16 Data Transfer One feature that was
More informationUML Class Diagrams (1.8.7) 9/2/2009
8 UML Class Diagrams Java programs usually involve multiple classes, and there can be many dependencies among these classes. To fully understand a multiple class program, it is necessary to understand
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 Design and Implementation of Multimedia Software
Chapter 3 Programs The Design and Implementation of Multimedia Software David Bernstein Jones and Bartlett Publishers www.jbpub.com David Bernstein (jbpub.com) Multimedia Software Jones and Bartlett 1
More informationTutorial : Getting started with the Java TM Media Framework
Tutorial : Getting started with the Java TM Media Framework With the growth of Internet there has been a radical change in the method of software design and deployment. Software applications are becoming
More informationXRD CONVERSION USER S MANUAL
XRD CONVERSION USER S MANUAL Table of Contents Document Layout........................................ 1 Starting XRD Conversion.................................. 2 XRD Conversion Main Window............................
More informationBI 4.1 Quick Start Guide
BI 4.1 Quick Start Guide BI 4.1 Quick Start Guide... 1 Introduction... 4 Logging in... 4 Home Screen... 5 Documents... 6 Preferences... 8 Setting Up Preferences to Display Public Folders... 10 Web Intelligence...
More informationJava (12 Weeks) Introduction to Java Programming Language
Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short
More informationHandout 3 cs180 - Programming Fundamentals Spring 15 Page 1 of 6. Handout 3. Strings and String Class. Input/Output with JOptionPane.
Handout 3 cs180 - Programming Fundamentals Spring 15 Page 1 of 6 Handout 3 Strings and String Class. Input/Output with JOptionPane. Strings In Java strings are represented with a class type String. Examples:
More informationCreating trouble-free numbering in Microsoft Word
Creating trouble-free numbering in Microsoft Word This note shows you how to create trouble-free chapter, section and paragraph numbering, as well as bulleted and numbered lists that look the way you want
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 informationpublic static void main(string[] args) { System.out.println("hello, world"); } }
Java in 21 minutes hello world basic data types classes & objects program structure constructors garbage collection I/O exceptions Strings Hello world import java.io.*; public class hello { public static
More informationJava Interview Questions and Answers
1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java
More informationINTRODUCTION TO DESKTOP PUBLISHING
INTRODUCTION TO DESKTOP PUBLISHING Desktop publishing uses page layout software and a personal computer to combine text, type, drawings, and images on a page to create books, newsletters, marketing brochures,
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 informationNETWORKING CHAPTER. Objectives
CHAPTER 33 NETWORKING Objectives To explain terms: TCP, IP, domain name, domain name server, streambased communications, and packet-based communications ( 33.2). To create servers using server sockets
More informationThe Reporting Console
Chapter 1 The Reporting Console This chapter provides a tour of the WebTrends Reporting Console and describes how you can use it to view WebTrends reports. It also provides information about how to customize
More informationEffective unit testing with JUnit
Effective unit testing with JUnit written by Eric M. Burke burke_e@ociweb.com Copyright 2000, Eric M. Burke and All rights reserved last revised 12 Oct 2000 extreme Testing 1 What is extreme Programming
More informationMixing Python and Java How Python and Java can communicate and work together
Mixing Python and Java How Python and Java can communicate and work together EuroPython 2009 (June 30th 2009, Birmingham) Andreas Schreiber German Aerospace Center (DLR), Cologne,
More informationWRITE-UP CS Adjusting Entry Procedures
WRITE-UP CS Adjusting Entry Procedures Introduction This document highlights a few of the special features in Write-Up CS that can help make processing easier. On the following pages, we provide step-by-step
More informationUsing the Monitoring and Report Viewer Web Services
CHAPTER 3 Using the Monitoring and Report Viewer Web Services This chapter describes the environment that you must set up to use the web services provided by the Monitoring and Report Viewer component
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 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 informationAdvanced OOP Concepts in Java
Advanced OOP Concepts in Java Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@imap.pitt.edu http://www.sis.pitt.edu/~spring 09/28/2001 1 Overview
More information