本文整理匯總了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();
}
示例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));
}
示例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();
}
}
示例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();
}
示例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();
}
示例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;
}
示例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);
}
示例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);
}