View Single Post
Old Feb 26, 2009 | 07:20 PM
  #11  
Roscco's Avatar
Roscco
Livin' [H]ard & Fast
 
Joined: Feb 2008
Posts: 564
Likes: 0
From: Edinburgh
Default

Originally Posted by PeterD
Hopefully somebody will know what I'm on about....

I'm trying to build a basic (windows) panel with two text entry fields. I'm trying to learn Groovy 1.6.0 and NetBeans is failing to compile this code and i think its to do with the open quotation mark in the two textfield statements, i cant take them out though because they are in the working examples I've been through from the developers website so they must work in the code, if they don't then I don't know what would

Here's my simple code......

import javax.swing.WindowConstants as WC

import groovy.swing.SwingBuilder

def swingB = new SwingBuilder()

def frame = swingB.frame(tittle:'Example01', location:[100,100],size:[800,800],
defaultCloseOperation:WC.EXIT_ON_CLOSE)
{
panel(border:titledBorder(title:'Name'))
{
label(text:'First name:')
textField(text:",columns:20)
label(text:'Last name:')
textField(text:",columns:20)
}
}

swingB.doLater{frame.visible = true}

Does anybody know why that causes an error?

Thanks in advance

Pete
The javax bit that i've made bold in the quote, should that not be javac ? All your output errors are asking for that eg "cannot be set on the contained <javac> element."
Reply