{"id":328,"date":"2019-05-12T21:29:13","date_gmt":"2019-05-12T12:29:13","guid":{"rendered":"https:\/\/0x0c.info\/?p=328"},"modified":"2019-05-12T21:29:13","modified_gmt":"2019-05-12T12:29:13","slug":"%e3%80%90java%e3%80%91swing-jframe-%e3%82%a6%e3%82%a4%e3%83%b3%e3%83%89%e3%82%a6%e3%81%ab%e7%94%bb%e5%83%8f%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b-%e3%81%a4%e3%81%84%e3%81%a7%e3%81%ab%e7%94%bb","status":"publish","type":"post","link":"https:\/\/0x0c.info\/?p=328","title":{"rendered":"\u3010Java\u3011swing JFrame \u30a6\u30a4\u30f3\u30c9\u30a6\u306b\u753b\u50cf\u3092\u8868\u793a\u3059\u308b \u3064\u3044\u3067\u306b\u753b\u50cf\u3092\u30ea\u30b5\u30a4\u30ba\u3059\u308b"},"content":{"rendered":"<p>\t\t\t\t\u30ea\u30b5\u30a4\u30ba\u5f8c\u306e\u30b5\u30a4\u30ba\u3092 pictureWidth, pictureHeight \u306b\u30bb\u30c3\u30c8\u3057\u3066\u304a\u304f\u3002<br \/>\n\u30a4\u30e1\u30fc\u30b8\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u306f filename \u306b\u3002<\/p>\n<pre><code>    JFrame.setDefaultLookAndFeelDecorated(true);\n    JFrame frame = new JFrame();\n    frame.setLayout(new GridLayout(1, 1));\n\n    BufferedImage img = null;\n    img = ImageIO.read(new File(filename));\n\n    Image dimg = img.getScaledInstance(pictureWidth, pictureHeight, Image.SCALE_SMOOTH);\n\n    ImageIcon image;\n    image = new ImageIcon(dimg);\n    image.getImage().flush();\n\n    JLabel label = new JLabel(image);\n    frame.add(label);\n\n    frame.pack();\n\n    frame.setVisible(true);\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u30ea\u30b5\u30a4\u30ba\u5f8c\u306e\u30b5\u30a4\u30ba\u3092 pictureWidth, pictureHeight \u306b\u30bb\u30c3\u30c8\u3057\u3066\u304a\u304f\u3002 \u30a4\u30e1\u30fc\u30b8\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u306f filename \u306b\u3002 JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame = new JFrame(); frame.setLayout(new GridLayout(1, 1)); BufferedImage img = null; img = ImageIO.read(new File(filename)); Image dimg = img.getScaledInstance(pictureWidth, pictureHeight, Image.SCALE_SMOOTH); ImageIcon image; image = new ImageIcon(dimg); image.getImage().flush(); JLabel label = new JLabel(image); frame.add(label); frame.pack(); frame.setVisible(true);<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[38,40,72,93,208,209],"class_list":["post-328","post","type-post","status-publish","format-standard","hentry","category-java","tag-java","tag-jframe","tag-swing","tag-93","tag-208","tag-209"],"_links":{"self":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/posts\/328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=328"}],"version-history":[{"count":0,"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/posts\/328\/revisions"}],"wp:attachment":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}