Border&GridLayout.java - import java.awt import javax.swing...

This preview shows page 1 out of 1 page.

import java.awt.*; // Needed for BorderLayout class import javax.swing.*; // Needed for Swing classes public class BorderFlowLayout { public static void main(String[] args) { // Set the title bar text. JFrame frame = new JFrame("Border & Grid Layout 2.3"); frame.setSize(450,300); // Specify an action for the close button. frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Add a BorderLayout manager to the content pane. JPanel Manager = new JPanel(new BorderLayout()); // Create 2 panels. JPanel panel1 = new JPanel(); panel1.setLayout(new BorderLayout()); JPanel panel2 = new JPanel(); panel2.setLayout(new GridLayout(2,3,0,5)); // Create five buttons. //tanginang hirap amp JButton button1 = new JButton("Button 3 LINE_START");

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture