import javax.swing.JFrame; //导入方法依赖的package包/类

public static void main(String... args) throws Throwable

{

JFrame window = new JFrame();

window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

window.setTitle("What Happened to Station 7");

window.setMinimumSize(new Dimension(400, 225));

window.setLayout(new GridBagLayout());

window.setExtendedState(JFrame.MAXIMIZED_BOTH);

JFrame opening_text = new JFrame();

opening_text.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

opening_text.setTitle("This Is What Happened to Station 7");

JTextArea textField = new JTextArea(

"The date is 123.5432.1241511 Station 7 is in full operation when suddenly one of the arachnids spot a rather large blue and yellow battle-cruiser barreling towards the aft section of the outer wheel. It suddenly plunges it self deep within the station. The flag suddenly comes within view… Its the swedes on their eternal quest to increase their GDP. They start to scatter but they are not quick enough to survive the army of Carl XVI Gustaf. The Dramatic entrance of the battle-cruiser had created a hull breach and the amount of air in the station was starting to drop; those blast doors can only hold so long….You Play as the aliens represented by the Purple hexes your objective is to get to the next floor of Staition 7 via the cyan ecape doors the sweds represented by the blue tiles are out to get you it would be in your best intrests to avoid them as they will kill you very quickly, if you notics your color shifting it indicats a change in helth and you will be best adviced to seek out the red health boxes but be carful as they will only heal you so much");

textField.setLineWrap(true);

textField.setWrapStyleWord(true);

opening_text.setMinimumSize(new Dimension(400, 225));

opening_text.add(textField, BorderLayout.PAGE_START);

opening_text.setExtendedState(JFrame.MAXIMIZED_BOTH);

opening_text.setAlwaysOnTop(true);

JFrame closing_text = new JFrame();

closing_text.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

closing_text.setTitle("You Have Fell to the Swedes");

JTextArea text = new JTextArea("You have failed to save your self…. The swedes trudge on obliterating the remaining inhabitants of the station. ");

text.setLineWrap(true);

text.setWrapStyleWord(true);

closing_text.setMinimumSize(new Dimension(400, 225));

closing_text.add(text, BorderLayout.PAGE_START);

closing_text.setExtendedState(JFrame.MAXIMIZED_BOTH);

SoundStuff soundStuff = new SoundStuff();

soundStuff.dbol();

Game game = new Game();

GameRenderer render = new GameRenderer(game);

render.addListeners(window);

GridBagConstraints layoutGame = new GridBagConstraints();

layoutGame.weightx = .9;

layoutGame.weighty = .9;

layoutGame.fill = GridBagConstraints.BOTH;

layoutGame.anchor = GridBagConstraints.NORTH;

window.add(render, layoutGame);

GameInfo info = new GameInfo(game);

info.addListeners();

GridBagConstraints layoutInfo = new GridBagConstraints();

layoutInfo.weightx = .1;

layoutInfo.weighty = .1;

layoutInfo.fill = GridBagConstraints.BOTH;

layoutInfo.anchor = GridBagConstraints.NORTH;

layoutInfo.gridy = 1;

window.add(info, layoutInfo);

game.init(render.new UIInterface(), info.new UIInterface());

closing_text.setVisible(true);

window.setVisible(true);

opening_text.setVisible(true);

Scanner reader = new Scanner(System.in);

int n = reader.nextInt();

if (n == 42)

{

System.out.print("adadfafd");

SoundStuff cam = null;

cam = new SoundStuff();

cam.CCCP();

reader.close();

}

}

java jframe案例_Java JFrame.setMinimumSize方法代码示例相关推荐

  1. java secretkey用法_Java SecretKeyFactory.generateSecret方法代码示例

    本文整理汇总了Java中javax.crypto.SecretKeyFactory.generateSecret方法的典型用法代码示例.如果您正苦于以下问题:Java SecretKeyFactory ...

  2. java polygon 用法_Java Polygon.getBounds方法代码示例

    import java.awt.Polygon; //导入方法依赖的package包/类 private SelectionShape translatePointsToRealSize(Select ...

  3. java settext用法_Java JFormattedTextField.setText方法代码示例

    import javax.swing.JFormattedTextField; //导入方法依赖的package包/类 /** * Creates a {@link JFormattedTextFie ...

  4. java makedir用法_Java Files.makeDir方法代码示例

    import org.nutz.lang.Files; //导入方法依赖的package包/类 protected void download(String openid, String media_ ...

  5. java args包_Java Args.positive方法代码示例

    import org.apache.http.util.Args; //导入方法依赖的package包/类 /** * Creates new instance of BHttpConnectionB ...

  6. java shape用法_Java PShape.scale方法代码示例

    import processing.core.PShape; //导入方法依赖的package包/类 public void updateAnim(){ if(pg_src_small == null ...

  7. java round指令_Java PApplet.round方法代码示例

    import processing.core.PApplet; //导入方法依赖的package包/类 public static final void updatePos() { if(follow ...

  8. java gettext用法_Java Context.getText方法代码示例

    import android.content.Context; //导入方法依赖的package包/类 /** * Song Details * * @param context * @param t ...

  9. java soap封装_Java SOAPMessage.writeTo方法代码示例

    import javax.xml.soap.SOAPMessage; //导入方法依赖的package包/类 private byte[] createProbeXML() throws SOAPEx ...

  10. java note项目_Java Request.setNote方法代码示例

    import org.apache.catalina.connector.Request; //导入方法依赖的package包/类 /** * Perform single-sign-on suppo ...

最新文章

  1. 用了10多年的 Tomcat 居然有bug,这能忍?
  2. 使用Lua编写whireshark插件
  3. 机器学习+算法考试有感 2019 山东大学
  4. 危害网络安全或入信用“黑名单”
  5. HashSet集合存储数据的结构(哈希表)及set集合存储元素不重复的原理
  6. python列表split_Python-split()函数实例用法讲解
  7. matlab 音频编辑器,在Matlab中使用App Designer可以进行实时音频处理吗?
  8. java隐含转化_java中自动转换和强制转换还有隐含转换
  9. Zookeeper可视化工具PrettyZoo
  10. 免费素材下载:200个超棒的矢量图标下载
  11. Axure自动幻灯片制作
  12. Coursera, Big Data 3, Integration and Processing (week 1/2/3)
  13. java代码自动生成
  14. V20变频器手自动切换(就地远程切换)的具体方法示例
  15. python遍历二维秋天_只要一杯秋天的奶茶,就能学会Python数值分析(1)
  16. ArcGIS不同坡度植被覆盖率分析步骤
  17. sqlplus方向键问题_wuli大世界_新浪博客
  18. CRC32绕过RAR密码
  19. 台式计算机怎么加一个硬盘,如何给台式机添加硬盘?给电脑添加硬盘的方法
  20. 跨境电商知识篇:平台与广告投放站之间的关系

热门文章

  1. Android dp方式的屏幕适配-原理(后期补充完整讲解)
  2. 计算机跨考哪门专业课最简单,非计算机专业跨考考研计算机难度如何?
  3. mysql创建数据库及中英文数据表--插入数据
  4. IDEA JSP实验作业-1
  5. Java基础(一):面向对象+UML+传参
  6. 小程序路由跳转,如何直接回到首页
  7. HTML+CSS大作业_ 美食网页制作作业_生猛海鲜美食网页设计
  8. 第4期|一周电商零售news汇总(2.1-2.7)李子柒刷新吉尼斯世界纪录:最多订阅量的油管中文频道...
  9. 【支持向量机】最大间隔超平面及Matlab代码
  10. Chapter7 对称密钥原语的实用构造