javax.swing.JApplet.setContentPane()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(177)

本文整理了Java中javax.swing.JApplet.setContentPane()方法的一些代码示例,展示了JApplet.setContentPane()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JApplet.setContentPane()方法的具体详情如下:
包路径:javax.swing.JApplet
类名称:JApplet
方法名:setContentPane

JApplet.setContentPane介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

//<applet code='Apletas' width='600' height='400'></applet>
import java.awt.BorderLayout;
import javax.swing.*;
import javax.swing.border.EmptyBorder;

public class Apletas extends JApplet {

  private JTextField inputLine;

  public Apletas()
  {
    inputLine = new JTextField(20);

    JPanel mainGui = new JPanel(new BorderLayout(20,20));
    mainGui.setBorder(new EmptyBorder(80,80,80,80));

    mainGui.add(inputLine, BorderLayout.NORTH);

    mainGui.add(new JScrollPane(new JTextArea(20,10)), BorderLayout.CENTER);
    JTree tree = new JTree();
    tree.expandRow(2);
    mainGui.add(new JScrollPane(tree), BorderLayout.WEST);

    setContentPane(mainGui);
    validate();
  }
}

代码示例来源:origin: net.sf.sf3jswing/kernel-core

private void _hideSplash() {
    if (antapplet instanceof AntApplet && antapplet.getApplet() != null) {
        antapplet.getApplet().setContentPane(antContents);
        antapplet.getApplet().validate();
    } else {
        splashFrame.setVisible(false);
    }
}
AntApplet antapplet = null;

代码示例来源:origin: stackoverflow.com

pane.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
pane.setBackground(new Color(0, 255,0));
setContentPane(pane);
pane.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
pane.setBackground(new Color(255, 0, 0));
setContentPane(pane);

代码示例来源:origin: stackoverflow.com

tb.addTab("Rcon Details", new RconSection());
setContentPane(tb);
validate();

代码示例来源:origin: stackoverflow.com

setContentPane(display);

代码示例来源:origin: stackoverflow.com

TelephoneKeypadPanel kpad = new TelephoneKeypadPanel();
setContentPane(kpad.getKeyPad());
validate();

代码示例来源:origin: stackoverflow.com

// <applet code='GoodTouchApplet' width='400' height='400'></applet>
import java.awt.event.*;
import javax.swing.*;

public class GoodTouchApplet extends JApplet {

  JPanel gui;

  public void init() {
    gui = new JPanel();
    gui.setFocusable(true);
    KeyListener keyListener = new KeyAdapter(){
      public void keyTyped(KeyEvent keyEvent) {
        System.out.println(keyEvent);
      }
    };
    gui.addKeyListener(keyListener);

    setContentPane(gui);
  }

  public void start () {
    // Applets and focus are a 'mess'.  Best request it.
    gui.requestFocusInWindow();
  }
}

代码示例来源:origin: stackoverflow.com

gui.add(new JScrollPane(output));
setContentPane(gui);
setMessage("initGui()" + noMessage);

代码示例来源:origin: stackoverflow.com

public void run() {
  Test2BPanel panel = new Test2BPanel();
  setContentPane(panel);

代码示例来源:origin: stackoverflow.com

setContentPane(gui);
validate();
timer.start();

代码示例来源:origin: stackoverflow.com

setContentPane(table); // makes our graphical JPanel container the content pane for the Applet

代码示例来源:origin: stackoverflow.com

display.add(txtHouseWins);
setContentPane(display);

代码示例来源:origin: stackoverflow.com

setContentPane( new SimplePaintPanel() );

代码示例来源:origin: stackoverflow.com

setContentPane(canvas);

代码示例来源:origin: stackoverflow.com

setContentPane(content);

代码示例来源:origin: stackoverflow.com

setContentPane(pane);
setContentPane(pane);

代码示例来源:origin: stackoverflow.com

this.setContentPane(canvas);

代码示例来源:origin: net.sf.sf3jswing/kernel-core

((TransparentBackground) splashContents).setDisableTransparency(true);
antContents = antapplet.getApplet().getContentPane();
antapplet.getApplet().setContentPane(splashContents);
antapplet.getApplet().validate();
antapplet.getApplet().setVisible(true);

相关文章