demo5() { f = new Frame(); f.setSize(300, 300); // f.setBackground(Color.red); f.setLayout(null); s1 = new Scrollbar(Scrollbar.VERTICAL, 0, 5, 0, 260); s1.setBackground(Color.red); s1.setBounds(30, 35, 20, 255); s2 = new Scrollbar(Scrollbar.VERTICAL, 0, 5, 0, 260); s2.setBackground(Color.green); s2.setBounds(60, 35, 20, 255); s3 = new Scrollbar(Scrollbar.VERTICAL, 0, 5, 0, 260); s3.setBackground(Color.blue); s3.setBounds(90, 35, 20, 255); f.add(s1); f.add(s2); f.add(s3); s1.addAdjustmentListener(this); s2.addAdjustmentListener(this); s3.addAdjustmentListener(this); p1 = new Panel(); p1.setBounds(120, 35, 170, 255); f.add(p1); f.setVisible(true); }
/** * This method initializes panel1 * * @return java.awt.Panel */ private Panel getPanel1() { if (panel1 == null) { panel1 = new Panel(); panel1.setLayout(null); panel1.setFont(new Font("Arial", Font.BOLD, 12)); panel1.setName(""); panel1.setBounds(new Rectangle(0, 78, 371, 4)); panel1.setBackground(new Color(91, 155, 213)); } return panel1; }
/** * This method initializes PanelExquisiteMembershipLine * * @return java.awt.Panel */ private Panel getPanelExquisiteMembershipLine() { if (PanelExquisiteMembershipLine == null) { PanelExquisiteMembershipLine = new Panel(); PanelExquisiteMembershipLine.setLayout(null); PanelExquisiteMembershipLine.setBounds(new Rectangle(0, 78, 371, 4)); PanelExquisiteMembershipLine.setFont(new Font("Arial", Font.BOLD, 12)); PanelExquisiteMembershipLine.setMinimumSize(new Dimension(300, 4)); PanelExquisiteMembershipLine.setName(""); PanelExquisiteMembershipLine.setBackground(new Color(91, 155, 213)); } return PanelExquisiteMembershipLine; }
/* WARNING: THIS METHOD WILL BE REGENERATED. */ private java.awt.Panel getPanel1() { if (ivjPanel1 == null) { try { ivjPanel1 = new java.awt.Panel(); ivjPanel1.setName("Panel1"); ivjPanel1.setLayout(null); ivjPanel1.setBackground(java.awt.Color.white); ivjPanel1.setBounds(6, 5, 386, 60); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } } return ivjPanel1; }
@Override public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); currentAppletSize.width = width; currentAppletSize.height = height; }