ButtonPanel.java
上传用户:aonuowh
上传日期:2021-05-23
资源大小:35390k
文件大小:1k
- /* $Id: ButtonPanel.java,v 1.3 2002/09/09 05:46:50 parasuraman Exp $ */
- /*
- * @(#)ButtonPanel.java
- * Copyright (c) 1996-2002 AdventNet, Inc. All Rights Reserved.
- * Please read the associated COPYRIGHTS file for more details.
- */
- import java.awt.*;
- import java.util.*;
- public class ButtonPanel extends Panel {
- Button buttons[] = null;
- public ButtonPanel(String labels[]) {
- if (labels == null) return;
- buttons = new Button[labels.length];
- for (int i =0;i<labels.length;i++) buttons[i] = new Button(labels[i]);
- thisLayout();
- }
- void thisLayout() {
- // setLayout(new GridLayout(1,buttons.length));
- for (int i=0;i<buttons.length;i++) add(buttons[i]);
- }
-
- public void setFont(Font font) {
- for (int i=0;i<buttons.length;i++) buttons[i].setFont(font);
- }
- }