{"id":1308,"date":"2014-03-08T09:51:38","date_gmt":"2014-03-08T09:51:38","guid":{"rendered":"http:\/\/graham-kendall.com\/blog\/?p=1308"},"modified":"2020-09-22T01:58:20","modified_gmt":"2020-09-22T01:58:20","slug":"swing-swt","status":"publish","type":"post","link":"https:\/\/graham-kendall.com\/blog\/swing-swt\/","title":{"rendered":"Swing or SWT when using WindowBuilder"},"content":{"rendered":"<p>In my <a href=\"https:\/\/graham-kendall.com\/blog\/2014\/03\/what-java-gui-to-use\/\">last post<\/a> I was trying to decide whether to use Swing or SWT when using WindowBuilder. I am using the Eclipse IDE.<\/p>\n<h1>Learning to use Swing or SWT<\/h1>\n<p>The problem is, there does not seem to be any clear cut view as to which is best. This <a href=\"http:\/\/stackoverflow.com\/questions\/2306190\/java-desktop-application-swt-vs-swing\" target=\"_blank\" rel=\"noopener noreferrer\">post<\/a> on stackexchange is typical.<\/p>\n<h1>Researching the options<\/h1>\n<p>Most of the forums\/tutorials I found on Google tended to jump in at the deep end, assuming that you know the basics and it was not very helpful in making this decision. Then I came across this youtube video.<\/p>\n<p>http:\/\/www.youtube.com\/watch?v=wknEVG9bJic<\/p>\n<p>The sound quality is not that good, but it takes you from how to install WindowBuilder, all the way to using Swing to create a window. I actually followed the tutorial in real time and managed to get the same results (a window with a text button in it), which I though was quite impressive.<\/p>\n<p>The tutorial uses Swing, and I have since heard that Swing is better for Windows applications. Whether that is true or not, I don&#8217;t know, but as I have to make a decision, I have decided (for now anyway) to adopt Swing.<\/p>\n<p>If I am honest, I don&#8217;t think it actually makes that much difference. The applications that I intend to write will be fairly simple from a GUI point of view, so I doubt that I would really push the limits of either Swing or SWT.<\/p>\n<h1>Decisions made<\/h1>\n<figure id=\"attachment_1291\" aria-describedby=\"caption-attachment-1291\" style=\"width: 300px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/graham-kendall.com\/blog\/wp-content\/uploads\/2014\/03\/AJDT_Eclipse_Screen.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"size-medium wp-image-1291 \" alt=\"Swing or SWT for the Eclipse IDE?\" src=\"https:\/\/graham-kendall.com\/blog\/wp-content\/uploads\/2014\/03\/AJDT_Eclipse_Screen-300x216.jpg\" width=\"300\" height=\"216\" srcset=\"https:\/\/graham-kendall.com\/blog\/wp-content\/uploads\/2014\/03\/AJDT_Eclipse_Screen-300x216.jpg 300w, https:\/\/graham-kendall.com\/blog\/wp-content\/uploads\/2014\/03\/AJDT_Eclipse_Screen-416x300.jpg 416w, https:\/\/graham-kendall.com\/blog\/wp-content\/uploads\/2014\/03\/AJDT_Eclipse_Screen.jpg 875w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1291\" class=\"wp-caption-text\">Eclipse IDE (Dowsnloaded from Google, vis Creative Commons &#8211; 06 Mar 2014)<\/figcaption><\/figure>\n<p>Whether, this is a good decision remains to be seen &#8211; but at least I am making some decisions. I have decided to use Eclipse, and now Swing.<\/p>\n<p>I think that these represent two of the major decisions and even they are not reversible. I can always switch at a later date.<\/p>\n<p>Probably of more importance now, is to actually write some Java code. Knowing C++ should make this relatively easy, but bolting everything together within a GUI might be the major challenge!<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my last post I was trying to decide whether to use Swing or SWT when using WindowBuilder. I am using the Eclipse IDE. Learning to use Swing or SWT The problem is, there does not seem to be any clear cut view as to which is best. This post on stackexchange is typical. Researching [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[177,158],"tags":[157],"class_list":["post-1308","post","type-post","status-publish","format-standard","hentry","category-archive","category-programming","tag-prediction_project"],"_links":{"self":[{"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/posts\/1308","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/comments?post=1308"}],"version-history":[{"count":5,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/posts\/1308\/revisions"}],"predecessor-version":[{"id":1618,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/posts\/1308\/revisions\/1618"}],"wp:attachment":[{"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/media?parent=1308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/categories?post=1308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/tags?post=1308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}