當前位置: 首頁>>代碼示例>>Java>>正文


Java JInternalFrame.setBounds方法代碼示例

本文整理匯總了Java中javax.swing.JInternalFrame.setBounds方法的典型用法代碼示例。如果您正苦於以下問題:Java JInternalFrame.setBounds方法的具體用法?Java JInternalFrame.setBounds怎麽用?Java JInternalFrame.setBounds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.swing.JInternalFrame的用法示例。


在下文中一共展示了JInternalFrame.setBounds方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setupFieldsFrame

import javax.swing.JInternalFrame; //導入方法依賴的package包/類
private void setupFieldsFrame() {
	frameFields = new JInternalFrame("Fields");
	frameFields.setResizable(true);
	frameFields.setIconifiable(true);
	frameFields.setBounds(frameClass.getWidth() + 11, 11, 180, 140);
	frameFields.setVisible(true);
	frameFields.setLayout(new BorderLayout());
	fields = new JList<>();
	fields.setCellRenderer(new MemberNodeRenderer());
	fields.addMouseListener(new MemberNodeClickListener(this, node, fields));
	DefaultListModel<FieldNode> model = new DefaultListModel<>();
	for (FieldNode fn : node.fields) {
		model.addElement(fn);
	}
	if (node.fields.size() == 0) {
		fields.setVisibleRowCount(5);
		fields.setPrototypeCellValue(new FieldNode(0, "Add_A_Field", "Ljava/lang/Object;", null, null));
	}
	fields.setModel(model);
	frameFields.add(new JScrollPane(fields), BorderLayout.CENTER);
	frameFields.pack();
}
 
開發者ID:Col-E,項目名稱:Recaf,代碼行數:23,代碼來源:ClassDisplayPanel.java

示例2: Test6505027

import javax.swing.JInternalFrame; //導入方法依賴的package包/類
public Test6505027(JFrame main) {
    Container container = main;
    if (INTERNAL) {
        JInternalFrame frame = new JInternalFrame();
        frame.setBounds(OFFSET, OFFSET, WIDTH, HEIGHT);
        frame.setVisible(true);

        JDesktopPane desktop = new JDesktopPane();
        desktop.add(frame, new Integer(1));

        container.add(desktop);
        container = frame;
    }
    if (TERMINATE) {
        this.table.putClientProperty(KEY, Boolean.TRUE);
    }
    TableColumn column = this.table.getColumn(COLUMNS[1]);
    column.setCellEditor(new DefaultCellEditor(new JComboBox(ITEMS)));

    container.add(BorderLayout.NORTH, new JTextField());
    container.add(BorderLayout.CENTER, new JScrollPane(this.table));
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:23,代碼來源:Test6505027.java

示例3: mostraTelaManterClientes

import javax.swing.JInternalFrame; //導入方法依賴的package包/類
/**
* Método responsável por instanciar e mostrar a tela de Manter Clientes
*
*/
public void mostraTelaManterClientes() {
	try {
		JInternalFrame newFrame = new ManterCliente(clienteService);
		newFrame.setBounds(frameInterno.getBounds());
		panelInterno.add(newFrame);
		newFrame.show();
	} catch (ParseException e1) {
		e1.printStackTrace();
	}
}
 
開發者ID:alexferreiradev,項目名稱:3way_laboratorios,代碼行數:15,代碼來源:Inicial.java

示例4: mostraTelaOperacoesBancarias

import javax.swing.JInternalFrame; //導入方法依賴的package包/類
/**
* Método responsável por instanciar e mostrar a tela de Operações Bancarias
*
*/
public void mostraTelaOperacoesBancarias() {
	JInternalFrame newFrame = new OperacoesBanco(this.contaService, clienteSelecionado);
	newFrame.setBounds(frameInterno.getBounds());
	panelInterno.add(newFrame);
	newFrame.show();
}
 
開發者ID:alexferreiradev,項目名稱:3way_laboratorios,代碼行數:11,代碼來源:Inicial.java

示例5: setupMethodsFrame

import javax.swing.JInternalFrame; //導入方法依賴的package包/類
private void setupMethodsFrame() {
	frameMethods = new JInternalFrame("Methods");
	frameMethods.setResizable(true);
	frameMethods.setIconifiable(true);
	int fw = frameFields == null ? 0 : frameFields.getWidth();
	frameMethods.setBounds(fw + frameClass.getWidth() + 11, 11, 180, 120);
	frameMethods.setVisible(true);
	frameMethods.setLayout(new BorderLayout());

	methods = new JList<>();
	methods.setCellRenderer(new MemberNodeRenderer());
	methods.addMouseListener(new MemberNodeClickListener(this, node, methods));
	DefaultListModel<MethodNode> model = new DefaultListModel<>();
	for (MethodNode mn : node.methods) {
		model.addElement(mn);
	}
	if (node.methods.size() == 0) {
		methods.setVisibleRowCount(5);
		methods.setPrototypeCellValue(new MethodNode(0, "Add_A_Method", "()Ljava/lang/Object;", null, null));
	}
	methods.setModel(model);
	frameMethods.add(new JScrollPane(methods), BorderLayout.CENTER);
	// TODO: Switch to table. A table may be bigger but allows for sorting
	// of members.
	//
	// frameMethods.add(new JScrollPane(MemberTable.create(node.methods)),
	// BorderLayout.CENTER);
	frameMethods.pack();
}
 
開發者ID:Col-E,項目名稱:Recaf,代碼行數:30,代碼來源:ClassDisplayPanel.java

示例6: create

import javax.swing.JInternalFrame; //導入方法依賴的package包/類
private static JInternalFrame create(int index) {
    String text = "test" + index; // NON-NLS: frame identification
    index = index * 3 + 1;

    JInternalFrame internal = new JInternalFrame(text, true, true, true, true);
    internal.getContentPane().add(new JTextArea(text));
    internal.setBounds(10 * index, 10 * index, WIDTH, HEIGHT);
    internal.setVisible(true);
    return internal;
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:11,代碼來源:Test6325652.java

示例7: prepareControls

import javax.swing.JInternalFrame; //導入方法依賴的package包/類
@Override
protected void prepareControls() {
    JFrame frame = new JFrame("Glass Pane children test");
    frame.setLayout(null);

    Container contentPane = frame.getContentPane();
    contentPane.setLayout(new BorderLayout());
    super.propagateAWTControls(contentPane);

    Container glassPane = (Container) frame.getRootPane().getGlassPane();
    glassPane.setVisible(true);
    glassPane.setLayout(null);

    internalFrame = new JInternalFrame("Internal Frame", true);
    internalFrame.setBounds(50, 0, 200, 100);
    internalFrame.setVisible(true);
    glassPane.add(internalFrame);

    internalFrame.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseClicked(MouseEvent e) {
            lwClicked = true;
        }
    });

    frame.setSize(300, 180);
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:31,代碼來源:JGlassPaneInternalFrameOverlapping.java

示例8: initialize

import javax.swing.JInternalFrame; //導入方法依賴的package包/類
/**
* Método responsável por inicializar todos os componentes swing deste frame
*
*/
private void initialize() {				
	frmGereciamentoDeBanco = new JFrame();
	frmGereciamentoDeBanco.setResizable(false);
	frmGereciamentoDeBanco.setTitle("Sistema de Gereciamento de Banco");
	frmGereciamentoDeBanco.setBounds(100, 100, 800, 600);
	frmGereciamentoDeBanco.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	frmGereciamentoDeBanco.getContentPane().setLayout(null);
	frmGereciamentoDeBanco.setLocationRelativeTo(null);

	JLabel lblBanco = new JLabel("Banco:");
	lblBanco.setFont(new Font("Tahoma", Font.BOLD, 14));
	lblBanco.setBounds(10, 11, 74, 23);
	frmGereciamentoDeBanco.getContentPane().add(lblBanco);

	JLabel lblAgencia = new JLabel("Agência:");
	lblAgencia.setFont(new Font("Tahoma", Font.BOLD, 14));
	lblAgencia.setBounds(10, 45, 74, 23);
	frmGereciamentoDeBanco.getContentPane().add(lblAgencia);

	btnManterClientes = new JButton("Manter Clientes");
	btnManterClientes.setBounds(10, 89, 170, 37);
	frmGereciamentoDeBanco.getContentPane().add(btnManterClientes);

	btnOperaesBancarias = new JButton("Operações Bancarias");
	btnOperaesBancarias.setBounds(190, 89, 170, 37);
	btnOperaesBancarias.setEnabled(Boolean.FALSE);
	frmGereciamentoDeBanco.getContentPane().add(btnOperaesBancarias);

	lblBancoResult = new JLabel("...");
	lblBancoResult.setFont(new Font("Tahoma", Font.BOLD, 14));
	lblBancoResult.setBounds(94, 11, 480, 20);
	frmGereciamentoDeBanco.getContentPane().add(lblBancoResult);

	lblAgenciaResult = new JLabel("...");
	lblAgenciaResult.setFont(new Font("Tahoma", Font.BOLD, 14));
	lblAgenciaResult.setBounds(94, 45, 480, 20);
	frmGereciamentoDeBanco.getContentPane().add(lblAgenciaResult);

	JSeparator separator = new JSeparator();
	separator.setBounds(10, 79, 764, 11);
	frmGereciamentoDeBanco.getContentPane().add(separator);

	panelInterno = new JDesktopPane();
	panelInterno.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));
	panelInterno.setBounds(10, 137, 764, 414);
	frmGereciamentoDeBanco.getContentPane().add(panelInterno);
	panelInterno.setLayout(null);

	frameInterno = new JInternalFrame("New JInternalFrame");
	frameInterno.setBounds(10, 11, 744, 392);
	panelInterno.add(frameInterno);
	frameInterno.setVisible(false);

}
 
開發者ID:alexferreiradev,項目名稱:3way_laboratorios,代碼行數:59,代碼來源:Inicial.java


注:本文中的javax.swing.JInternalFrame.setBounds方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。