
static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon) Brings up a dialog with a specified icon, where the number of choices is determined by the optionType parameter.Ģ1 JOptionPane Cont` static String showInputDialog(Component parentComponent, Object message) Shows a question-message dialog requesting input from the user parented to parentComponent. Static method:Ģ0 JOptionPane Cont` static int showConfirmDialog(Component parentComponent, Object message) Brings up a dialog with the options Yes, No and Cancel with the title, Select an Option static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType) Brings up a dialog where the number of choices is determined by the optionType parameter static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType) Brings up a dialog where the number of choices is determined by the optionType parameter, where the messageType parameter determines the icon to display.

JText JTable JTree FileDialog ( and JFileChooser) JColorChooserīeberapa komponen yang akan dikenalkan secara mendetail adalah sebagai berikut: JOptionPane JFrame JTextField JPasswordField JLabel JButton Komponen yang lain silakan dipelajari pada saat asisten + dipelajari sendiriġ9 JOptionPane JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something. JProgressBar Label ( and JLabel) JToolTipġ7 Editable Displays of Formatted Information JTextField JSlider List ( and JList) Choice ( and JComboBox) Panel ( and JPanel) JScrollPane JToolBar JSplitPane JTabbedPaneġ5 Basic Controls JCheckBox JRadioButton JButton JMenu JMenuItem Editable Displays of Formatted Information Atomic components that display highly formatted information that (if you choose) can be edited by the user.ġ2 Top-Level Containers Frame ( and JFrame) Applet (and JApplet) Uneditable Information Displays Atomic components that exist solely to give the user information. Basic Controls Atomic components that exist primarily to get input from the user they generally also show simple state. Special-Purpose Containers Intermediate containers that play specific roles in the UI.

General-Purpose Containers Intermediate containers that can be used under many different circumstances. Top-Level Containers The components at the top of any Swing containment hierarchy. Komponen GUI dibagi ke dalam 2 kelompok kategori: Container Containmentħ Container Container adalah component yang mampu menampung komponen lain dan merupakan wadah untuk meletakkan containment component Misalkan form, panelĬontainment adalah component yang harus diletakkan ke dalam sebuah container Sebuah containment component hanya boleh berada dalam sebuah container Biasanya containment component adalah komponen2 yg digunakan untuk interaksi dengan user seperti label, input, tombol dkkĩ Know Java-based GUI Java menyediakan 2 buah sarana untuk bermain dengan GUI: Abstract Window Toolkit (AWT) Swing Keduanya menyediakan fasilitas yang hampir serupa dalam mengembangkan app berbasis GUI Swing merupakan perkembangan dari AWTĪpp yang dibangun menggunakan AWT sering mengalami inconsistent dalam hal tampilan jika dijalankan di platform yang berbeda

#Membuat label berada di atas panel java password
Untuk membangun app yang menarik sudah saatnya mengenal GUI GUI dibangun berdasarkan komponen – komponen grafikal yang disusun sedemikian rupa sehingga membentuk suatu tampilan yang lengkap sesuai dengan kehendak programmer Komponen – komponen GUI pada umumnya dibangun menggunakan konsep OOPĥ GUI Components A Form A Label A Text Field A Password Field A Button 2 Introduction User sebuah sistem menilai sebuah app berdasarkan 2 hal utama: Fungsionalitas Interface Fungsionalitas berbicara mengenai apa yang bisa dilakukan app untuk membantu user Interface berbicara mengenai tampilan app yang user hadapi untuk sarana interaksi dengan sistem App yang baik adalah app selain bekerja dengan baik juga harus memiliki interface yang menarik dan mampu memberikan kemudahan interaksi user (user-friendly)ģ Look At These! Dari kedua app di atas, app manakah yang lebih Anda sukai untuk Anda gunakan? Manakah yang lebih menarik?
