<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://java.dzone.com"  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dz="http://www.developerzone.com/modules/dz/1.0" 0="xmlns:media=&quot;http://search.yahoo.com/mrss/&quot;">
<channel>
 <title>Javalobby - Comments for &quot;Create a Yahtzee Dice Roller and Scorer in Compiled JavaFX Script&quot;</title>
 <link>http://java.dzone.com/articles/create-yahtzee-dice-roller-and</link>
 <description>Comments for &quot;Create a Yahtzee Dice Roller and Scorer in Compiled JavaFX Script&quot;</description>
 <language>en</language>
<item>
 <title>Wow! That code looks almost</title>
 <link>http://java.dzone.com/articles/create-yahtzee-dice-roller-and#comment-2115</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;Wow!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;That code looks almost like a dfm file (Delphi)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class=&quot;csharp&quot;&gt;object FSeg_Soc: TFSeg_Soc&lt;br /&gt;  Left = 217&lt;br /&gt;  Top = 115&lt;br /&gt;  HelpContext = 36&lt;br /&gt;  BorderIcons = [biSystemMenu, biMaximize]&lt;br /&gt;  BorderStyle = bsSingle&lt;br /&gt;  ClientHeight = 352&lt;br /&gt;  ClientWidth = 544&lt;br /&gt;  Color = clBtnFace&lt;br /&gt;  Font.Charset = DEFAULT_CHARSET&lt;br /&gt;  Font.Color = clWindowText&lt;br /&gt;  Font.Height = -11&lt;br /&gt;  Font.Name = &#039;MS Sans Serif&#039;&lt;br /&gt;  Font.Style = []&lt;br /&gt;  HelpFile = &#039;Ayudas\SegSoc.chm&#039;&lt;br /&gt;  KeyPreview = True&lt;br /&gt;  OldCreateOrder = True&lt;br /&gt;  Position = poScreenCenter&lt;br /&gt;  OnActivate = FormActivate&lt;br /&gt;  OnClose = FormClose&lt;br /&gt;  OnCreate = FormCreate&lt;br /&gt;  OnDestroy = FormDestroy&lt;br /&gt;  OnKeyDown = FormKeyDown&lt;br /&gt;  PixelsPerInch = 96&lt;br /&gt;  TextHeight = 13&lt;br /&gt;  object DBGrid1: TDBGrid&lt;br /&gt;    Left = 0&lt;br /&gt;    Top = 210&lt;br /&gt;    Width = 544&lt;br /&gt;    Height = 142&lt;br /&gt;    Align = alClient&lt;br /&gt;    DataSource = DataBaseAux&lt;br /&gt;    Options = [dgEditing, dgTitles, dgIndicator, dgColLines, dgRowLines, dgConfirmDelete, dgCancelOnExit]&lt;br /&gt;    PopupMenu = PopupMenu1&lt;br /&gt;    TabOrder = 0&lt;br /&gt;    TitleFont.Charset = DEFAULT_CHARSET&lt;br /&gt;    TitleFont.Color = clWindowText&lt;br /&gt;    TitleFont.Height = -11&lt;br /&gt;    TitleFont.Name = &#039;MS Sans Serif&#039;&lt;br /&gt;    TitleFont.Style = []&lt;br /&gt;    OnColExit = DBGrid1ColExit&lt;br /&gt;    OnEditButtonClick = DBGrid1EditButtonClick&lt;br /&gt;    OnKeyDown = DBGrid1KeyDown&lt;br /&gt;    OnKeyPress = DBGrid1KeyPress&lt;br /&gt;    Columns = &amp;lt;&lt;br /&gt;      item&lt;br /&gt;        ButtonStyle = cbsEllipsis&lt;br /&gt;        Expanded = False&lt;br /&gt;        FieldName = &#039;EMPDSDE&#039;&lt;br /&gt;        Title.Alignment = taCenter&lt;br /&gt;        Title.Caption = &#039;Enterprise(D)&#039;&lt;br /&gt;        Visible = True&lt;br /&gt;      end&lt;br /&gt;      item&lt;br /&gt;        ButtonStyle = cbsEllipsis&lt;br /&gt;        Expanded = False&lt;br /&gt;        FieldName = &#039;EMPAST&#039;&lt;br /&gt;        Title.Alignment = taCenter&lt;br /&gt;        Title.Caption = &#039;Enterprise(H)&#039;&lt;br /&gt;        Visible = True&lt;br /&gt;      end&lt;br /&gt;      item&lt;br /&gt;        Color = 8454143&lt;br /&gt;        Expanded = False&lt;br /&gt;        FieldName = &#039;TYPE&#039;&lt;br /&gt;        ReadOnly = True&lt;br /&gt;        Title.Alignment = taCenter&lt;br /&gt;        Width = 67&lt;br /&gt;        Visible = True&lt;br /&gt;      end&lt;br /&gt;      item&lt;br /&gt;        Color = 8454143&lt;br /&gt;        Expanded = False&lt;br /&gt;        FieldName = &#039;WHO&#039;&lt;br /&gt;        ReadOnly = True&lt;br /&gt;        Width = 312&lt;br /&gt;        Visible = True&lt;br /&gt;      end&amp;gt;&lt;br /&gt;  end&lt;br /&gt;  object CoolBar1: TCoolBar&lt;br /&gt;    Left = 0&lt;br /&gt;    Top = 0&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
 <pubDate>Thu, 27 Mar 2008 14:25:04 -0400</pubDate>
 <dc:creator>a6767</dc:creator>
 <guid isPermaLink="false">comment 2115 at http://java.dzone.com</guid>
</item>
<item>
 <title>It looks good Jim, but I&#039;m</title>
 <link>http://java.dzone.com/articles/create-yahtzee-dice-roller-and#comment-2103</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;It looks good Jim, but I&#039;m not quite convinced, it took 443 lines of code (sans comments) to get this example working, surely surrendering some formatting will shrink that number, but that is not exactly the point. I mean there is repetition while laying out the components of the GroupPanel: first rows are defined as vars, then they are assigned to the rows property of the panel, lastly they are used as constraints for each label. the jfx looks like its doing something like the following under the covers&lt;/p&gt;&lt;pre class=&quot;java&quot;&gt;GroupPanel gp = new GroupPanel();&lt;br /&gt;// if Row constructor accepts an alignment as parameter&lt;br /&gt;Row fiveOfKindRow = new Row( Alignment.BASELINE ); &lt;br /&gt;// if Row constructor does not accept an alignment parameter&lt;br /&gt;Row largeStraightRow = new Row();&lt;br /&gt;largeStraightRow.setAlignment( Alignment.BASELINE ); &lt;br /&gt;...&lt;br /&gt;gp.addRow( fiveOfKindRow );&lt;br /&gt;gp.addRow( largeStraightRow );&lt;br /&gt;/* or it may be like&lt;br /&gt; gp.setRows( new Row[]{ fiveOfKindRow, largeStraightRow, ...} )&lt;br /&gt;*/&lt;br /&gt;gp.getContentPane().add( new SimpleLabel(...),&lt;br /&gt;        new RowColumnConstraint(fiveOfKindRow,labelsColumn) );&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;I&#039;m surely biased when I say that a builder (not necessarily a Groovy one, thought it doesn&#039;t hurt) is best suited for this task, as it will keep the DRY-ness in check, as with this approach the code may look like the following one&lt;/p&gt;&lt;pre class=&quot;javafx&quot;&gt;GroupPanel { &lt;br /&gt;   // we fix the # of columns first&lt;br /&gt;   columns {&lt;br /&gt;      Column( alignment: Alignment.TRAILING )&lt;br /&gt;      Column( alignment: Alignment.LEADING )&lt;br /&gt;   }&lt;br /&gt;   // add the first row&lt;br /&gt;   Row( alignment: alignment.BASELINE ) {&lt;br /&gt;      SimpleLabel( text: &amp;quot;Five of a Kind (Yathzee):&amp;quot;, font: evalFont )&lt;br /&gt;      SimpleLabel( font: evalFont, text: bind if (model.fiveOfKind)&lt;br /&gt;                               &amp;quot;{model.fineOfKindScore}&amp;quot; else &#039;N/A&amp;quot; )&lt;br /&gt;   }&lt;br /&gt;   // add more rows&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt; My $0.02&lt;/p&gt;</description>
 <pubDate>Thu, 27 Mar 2008 12:41:50 -0400</pubDate>
 <dc:creator>aalmiray</dc:creator>
 <guid isPermaLink="false">comment 2103 at http://java.dzone.com</guid>
</item>
</channel>
</rss>
