* To change this license header, choose License Headers in Project Properties.

Similar documents
Answer on question #61311, Programming & Computer Science / Java

* To change this license header, choose License Headers in Project Properties.

Java Programming Summer 2008 LAB. Thursday 8/21/2008

/** Creates new form NewJFrame */ public NewJFrame() { initcomponents(); initblogsearch(); //initializes Index List box }

Travel Agency. Khateeb Engineering Classes. Mini Project. Khateeb Engineering Classes: / Technology to be used

JAVA CODE JAVA CODE: BINOMIAL TREES OPTION PRICING BINOMIALTREE CLASS PAGE 1

Appendix I: Software Coding

I.1 Introduction Matisse GUI designer I.2 GroupLayout Basics Sequential and Parallel Arrangements sequential horizontal orientation

INSTITUTO POLITÉCNICO NACIONAL ESCUELA SUPERIOR DE CÓMPUTO

DAFTAR LAMPIRAN. Source Code Java Aplikasi Keyword to Image Renamer Split

jlabel14 = new javax.swing.jlabel(); jlabel15 = new javax.swing.jlabel(); jlabel16 = new javax.swing.jlabel(); jlabel17 = new javax.swing.

CHAPTER 8 INFERENCE. The concept of Inference would be explained in the following chapter, as the CTBN

Hanley s Survival Guide for Visual Applications with NetBeans 2.0 Last Updated: 5/20/2015 TABLE OF CONTENTS

/* * MoraDrill.java * Version last updated 6 April 2010 * Written by John K. Estell * Created on November 30, 2008, 10:22 PM */

privateint m, n, smithitemcount, raitaitemcount;

The class definition is not a program by itself. It can be used by other programs in order to create objects and use them.

1 Using the NetBeans IDE

Role-Coll Role Based Collaboration Software

Project Helpine Report BANQUET HALL BOOKING

SampleApp.java. Page 1

Lampiran A. SOURCE CODE PROGRAM

グラフを表すデータ構造 JAVA での実装

TECHNICAL DOCUMENTATION

We have several alternatives now, which we need to address. Here is a list of them: 1. How to get HTML interpreted correctly.

Our first program is a simple calculator, which will carry out the arithmetic operations of adding, subtracting, multiplying and dividing numbers.

Goals. Lecture 7 More GUI programming. The application. The application D&D 12. CompSci 230: Semester JFrame subclass: ListOWords

Graphical User Interface

Based on slides by Prof. Burton Ma

Proctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.

CSCI 201L Midterm Written Summer % of course grade

LAMPIRAN PERANGKAT LUNAK

COMP16121 Sample Code Lecture 1

Multiple Choice Questions: Identify the choice that best completes the statement or answers the question. (15 marks)

Object-Oriented Software Engineering Re-exam, 2012 (Also Object-Oriented Analysis, Design and Programming, Re-exam, 2012)

Systems Programming. Bachelor in Telecommunication Technology Engineering Bachelor in Communication System Engineering Carlos III University of Madrid

COSC 123 Computer Creativity. Graphics and Events. Dr. Ramon Lawrence University of British Columbia Okanagan

Swing - JTextField. Adding a text field to the main window (with tooltips and all)

17 GUI API: Container 18 Hello world with a GUI 19 GUI API: JLabel 20 GUI API: Container: add() 21 Hello world with a GUI 22 GUI API: JFrame: setdefau

Swing - JLabel. Adding a text (and HTML) labels to a GUI

Proctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.

Proctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.

GUI (Graphic User Interface) Programming. Part 2 (Chapter 8) Chapter Goals. Events, Event Sources, and Event Listeners. Listeners

PART1: Choose the correct answer and write it on the answer sheet:

Constructing an Index Fund Using Interior Point Primal Dual Method

Example: Building a Java GUI

Example: Building a Java GUI

CSCI 201L Midterm Written SOLUTION Summer % of course grade

More about GUIs GEEN163

Chapter 8. Java continued. CS Hugh Anderson s notes. Page number: 264 ALERT. MCQ test next week. This time. This place.

Java continued. Chapter 8 ALERT ALERT. Last week. MCQ test next week. This time. This place. Closed book. Assignment #2 is for groups of 3

AP CS Unit 11: Graphics and Events

Section Basic graphics

Proctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.

Final Examination Semester 3 / Year 2008

Izpack installer guide

Graphical User Interface (GUI) components in Java Applets. With Abstract Window Toolkit (AWT) we can build an applet that has the basic GUI

Overview. Lecture 7: Inheritance and GUIs. Inheritance. Example 9/30/2008

Proctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.

Page 1 of 16. Proctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.

Multimedia Programming

Dr. Hikmat A. M. AbdelJaber

Chapter 2. Network Chat

Proctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.

Java Graphical User Interfaces AWT (Abstract Window Toolkit) & Swing

DESIGN AND IMPLEMENTATION OF A PUZZLE GAME USING JAVA SE 1. University Politehnica Timisoara, Faculty Engineering Hunedoara, ROMANIA

Part I: Learn Common Graphics Components

CMP 326 Final Spring There is a blank page at the end of the exam if you need more room to answer a question.

JRadioButton account_type_radio_button2 = new JRadioButton("Current"); ButtonGroup account_type_button_group = new ButtonGroup();

Dr. Hikmat A. M. AbdelJaber

LAMPIRAN Lampiran Utama. a. Struktur Organisasi

Information systems modelling UML and service description languages

To gain experience using GUI components and listeners.

Module 5 The Applet Class, Swings. OOC 4 th Sem, B Div Prof. Mouna M. Naravani

Java, Swing, and Eclipse: The Calculator Lab.

Graphical interfaces & event-driven programming

Studying software design patterns is an effective way to learn from the experience of others

PART 23. Java GUI Advanced JList Component. more items.

AppBisect > PrBisect > class Functie. AppBisect > PrBisect > class Punct. public class Functie { double x(double t) { return t;

Proctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.

Midterm assessment - MAKEUP Fall 2010

Datenbank-Praktikum. Universität zu Lübeck Sommersemester 2006 Lecture: Swing. Ho Ngoc Duc 1

APPENDIX. public void cekroot() { System.out.println("nilai root : "+root.data); }

POLYTECHNIC OF NAMIBIA SCHOOL OF COMPUTING AND INFORMATICS DEPARTMENT OF COMPUTER SCIENCE

COMP16121 Notes on Mock Exam Questions

Binghamton University. CS-140 Fall Problem Solving. Creating a class from scratch

Proctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.

G51PGP Programming Paradigms. Lecture 009 Concurrency, exceptions

!"# $ %&# %####' #&() % # # # #&* # ## +, # -

14.2 Java s New Nimbus Look-and-Feel 551 Sample GUI: The SwingSet3 Demo Application As an example of a GUI, consider Fig. 14.1, which shows the SwingS

CONTENTS. Chapter 1 Getting Started with Java SE 6 1. Chapter 2 Exploring Variables, Data Types, Operators and Arrays 13

INGESTING N NWIS J S DATA USING AVA. July 11, by: Apurv Bhartia Resources Austin

Workbook 7. Remember to check the course website regularly for announcements and errata:

Swing. By Iqtidar Ali

Building a GUI in Java with Swing. CITS1001 extension notes Rachel Cardell-Oliver

TTTK Program Design and Problem Solving Tutorial 3 (GUI & Event Handlings)

Part 3: Graphical User Interface (GUI) & Java Applets

Object-Oriented Software Engineering (Re-exam for Object-Oriented Analysis, Design and Programming)

Table of Contents. Chapter 1 Getting Started with Java SE 7 1. Chapter 2 Exploring Class Members in Java 15. iii. Introduction of Java SE 7...

GUI Applications. Let s start with a simple Swing application in Java, and then we will look at the same application in Jython. See Listing 16-1.

AnimatedImage.java. Page 1

Transcription:

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools Templates * and open the template in the editor. package tugasumbyjava; /** * * public class Tugas_5_Java extends javax.swing.jframe { /** * Creates new form Tugas_5_Java public Tugas_5_Java() { initcomponents(); /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="generated Code"> private void initcomponents() {

jmenu1 = new javax.swing.jmenu(); jlabel1 = new javax.swing.jlabel(); jlabel2 = new javax.swing.jlabel(); jlabel3 = new javax.swing.jlabel(); jlabel4 = new javax.swing.jlabel(); jlabel5 = new javax.swing.jlabel(); jlabel6 = new javax.swing.jlabel(); jtextfield1 = new javax.swing.jtextfield(); jlabel7 = new javax.swing.jlabel(); jtextfield2 = new javax.swing.jtextfield(); jlabel8 = new javax.swing.jlabel(); jtextfield3 = new javax.swing.jtextfield(); jlabel9 = new javax.swing.jlabel(); jradiobutton1 = new javax.swing.jradiobutton(); jradiobutton2 = new javax.swing.jradiobutton(); jlabel10 = new javax.swing.jlabel(); jcombobox1 = new javax.swing.jcombobox(); jlabel11 = new javax.swing.jlabel(); jtextfield4 = new javax.swing.jtextfield(); jlabel12 = new javax.swing.jlabel(); jtextfield5 = new javax.swing.jtextfield(); jlabel13 = new javax.swing.jlabel(); jtextfield6 = new javax.swing.jtextfield(); jbutton1 = new javax.swing.jbutton(); jbutton2 = new javax.swing.jbutton(); jbutton3 = new javax.swing.jbutton(); jmenu1.settext("jmenu1"); setdefaultcloseoperation(javax.swing.windowconstants.exit_on_close);

jlabel1.settext("sin :"); jlabel2.settext("13111020"); jlabel3.settext("name :"); jlabel4.settext("randi Putra Abdali"); jlabel5.settext("e-learning (Identity)"); jlabel6.settext("sin"); jlabel7.settext("name"); jlabel8.settext("address"); jlabel9.settext("gander"); jradiobutton1.settext("male"); jradiobutton2.settext("famale"); jlabel10.settext("religion"); jcombobox1.setmodel(new javax.swing.defaultcomboboxmodel(new String[] { "Islam", "Kristen", "Budha", "Konghucu", "Protestan" )); jcombobox1.addactionlistener(new java.awt.event.actionlistener() { ); public void actionperformed(java.awt.event.actionevent evt) { jcombobox1actionperformed(evt);

jlabel11.settext("e-mail"); jlabel12.settext("facebook"); jlabel13.settext("phone"); jbutton1.settext("save"); jbutton2.settext("edit"); jbutton3.settext("exit"); javax.swing.grouplayout layout = new javax.swing.grouplayout(getcontentpane()); getcontentpane().setlayout(layout); layout.sethorizontalgroup( layout.createparallelgroup(javax.swing.grouplayout.alignment.leading).addgroup(layout.createparallelgroup(javax.swing.grouplayout.alignment.leading, false).addgap(22, 22, 22).addComponent(jLabel3).addComponent(jLabel4)).addComponent(jLabel1, javax.swing.grouplayout.preferred_size, 51, javax.swing.grouplayout.preferred_size).addpreferredgap(javax.swing.layoutstyle.componentplacement.related)

.addcomponent(jlabel2)))).addgap(68, 68, 68).addComponent(jLabel5)).addContainerGap().addComponent(jLabel8).addComponent(jTextField3, javax.swing.grouplayout.preferred_size, 132, javax.swing.grouplayout.preferred_size)).addcontainergap().addcomponent(jlabel7).addcomponent(jlabel6)).addpreferredgap(javax.swing.layoutstyle.componentplacement.related, 22, Short.MAX_VALUE).addComponent(jTextField2, javax.swing.grouplayout.preferred_size, 178, javax.swing.grouplayout.preferred_size).addcomponent(jtextfield1, javax.swing.grouplayout.preferred_size, 130, javax.swing.grouplayout.preferred_size))).addcontainergap().addcomponent(jlabel9).addcomponent(jradiobutton1).addcomponent(jradiobutton2)).addcomponent(jlabel10)

.addcomponent(jcombobox1, javax.swing.grouplayout.preferred_size,.addcomponent(jlabel12).addcomponent(jlabel13).addcomponent(jlabel11)).addcomponent(jtextfield4, javax.swing.grouplayout.preferred_size, 150, javax.swing.grouplayout.preferred_size) false).addgroup(layout.createparallelgroup(javax.swing.grouplayout.alignment.leading,.addcomponent(jtextfield5).addcomponent(jtextfield6, javax.swing.grouplayout.default_size, 171, Short.MAX_VALUE))))))).addGap(19, 19, 19).addComponent(jButton1).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jButton2).addComponent(jButton3))).addContainerGap(163, Short.MAX_VALUE)) ); layout.setverticalgroup( layout.createparallelgroup(javax.swing.grouplayout.alignment.leading).addgap(25, 25, 25).addComponent(jLabel1).addComponent(jLabel2))

.addcomponent(jlabel3).addcomponent(jlabel4)).addcomponent(jlabel5).addcomponent(jlabel6).addcomponent(jtextfield1, javax.swing.grouplayout.preferred_size,.addcomponent(jlabel7).addcomponent(jtextfield2, javax.swing.grouplayout.preferred_size,.addcomponent(jlabel8).addcomponent(jtextfield3, javax.swing.grouplayout.preferred_size,.addcomponent(jlabel9).addcomponent(jradiobutton1).addcomponent(jradiobutton2)).addcomponent(jlabel10).addcomponent(jcombobox1, javax.swing.grouplayout.preferred_size,.addpreferredgap(javax.swing.layoutstyle.componentplacement.related)

.addcomponent(jlabel11).addcomponent(jtextfield4, javax.swing.grouplayout.preferred_size,.addcomponent(jlabel12).addcomponent(jtextfield5, javax.swing.grouplayout.preferred_size,.addgroup(layout.createparallelgroup(javax.swing.grouplayout.alignment.trailing).addcomponent(jlabel13).addcomponent(jtextfield6, javax.swing.grouplayout.preferred_size, );.addgap(45, 45, 45).addComponent(jButton1).addComponent(jButton2).addComponent(jButton3)).addContainerGap(56, Short.MAX_VALUE)) pack(); // </editor-fold> private void jcombobox1actionperformed(java.awt.event.actionevent evt) { // TODO add your handling code here: /** * @param args the command line arguments public static void main(string args[]) {

/* Set the Nimbus look and feel //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html try { for (javax.swing.uimanager.lookandfeelinfo info : javax.swing.uimanager.getinstalledlookandfeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.uimanager.setlookandfeel(info.getclassname()); break; catch (ClassNotFoundException ex) { java.util.logging.logger.getlogger(tugas_5_java.class.getname()).log(java.util.logging.level.severe, null, ex); catch (InstantiationException ex) { java.util.logging.logger.getlogger(tugas_5_java.class.getname()).log(java.util.logging.level.severe, null, ex); catch (IllegalAccessException ex) { java.util.logging.logger.getlogger(tugas_5_java.class.getname()).log(java.util.logging.level.severe, null, ex); catch (javax.swing.unsupportedlookandfeelexception ex) { java.util.logging.logger.getlogger(tugas_5_java.class.getname()).log(java.util.logging.level.severe, null, ex); //</editor-fold> /* Create and display the form java.awt.eventqueue.invokelater(new Runnable() { public void run() { new Tugas_5_Java().setVisible(true);

); // Variables declaration - do not modify private javax.swing.jbutton jbutton1; private javax.swing.jbutton jbutton2; private javax.swing.jbutton jbutton3; private javax.swing.jcombobox jcombobox1; private javax.swing.jlabel jlabel1; private javax.swing.jlabel jlabel10; private javax.swing.jlabel jlabel11; private javax.swing.jlabel jlabel12; private javax.swing.jlabel jlabel13; private javax.swing.jlabel jlabel2; private javax.swing.jlabel jlabel3; private javax.swing.jlabel jlabel4; private javax.swing.jlabel jlabel5; private javax.swing.jlabel jlabel6; private javax.swing.jlabel jlabel7; private javax.swing.jlabel jlabel8; private javax.swing.jlabel jlabel9; private javax.swing.jmenu jmenu1; private javax.swing.jradiobutton jradiobutton1; private javax.swing.jradiobutton jradiobutton2; private javax.swing.jtextfield jtextfield1; private javax.swing.jtextfield jtextfield2; private javax.swing.jtextfield jtextfield3; private javax.swing.jtextfield jtextfield4; private javax.swing.jtextfield jtextfield5; private javax.swing.jtextfield jtextfield6; // End of variables declaration

Hasil