I'm trying to catch a mouse-click even on a Table (which should cause a popup to be shown). The table is inside a ScrollPane which is (in turn) inside a Panel. I have added reactions to all the classes, but I can never seem to actually get a click event to be caught!
class MyPanel extends GridBagPanel {
val gbc = new GridBagContraints...
In response to a previous question on how to achieve a certain effect with Swing, I was directed to JDesktopPane and JInternalFrame. Unfortunately, scala.swing doesn't seem to have any wrapper for either class, so I'm left with extending it.
What do I have to know and do to make minimally usable wrappers for these classes, to be used wi...
Hello I am having problems when using the Scala Swing library in version 2.8 Beta1-prerelease. I have a situation where I want to show a table in GUI, and update it as results are returned from a SQL request. Which way could this be done in Scala, at the moment i am using the DefaultTableModel from Java library.
Another thing is that I ...
Is there a good tutorial showing how to use scala.swing._ ?
...
I tried to implement a date selection using three ComboBox as shown below.
contents += new Label("Selected Date:")
val dayBox = new ComboBox(1 to 31)
contents += dayBox
val monthBox = new ComboBox(List("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))
contents += monthBox
listenTo(monthBox.selection)
r...
//Main.scala
/* imports */
object Main extends SimpleSwingApplication {
lazy val ui = new TabbedPane {
/* contents */
}
def top = new MainFrame {
/* contents */
}
override def startup(args: Array[String]) {
val t = top
val loginStatus = new Login(t).status
if (loginStatus == true) {
if (t.size == ...
hi
I've got a little Problem: I want to have Buttons in some of the cells of my Table. As rendering component I return a Button with the following code: (theres application specific and debugging code in this example but you'll get the picture)
class LivingTreeButton(lt:LivingTree[_], client:TableBehaviourClient) extends Button(Action(...
I have a collection of ComboBox declared as below.
val cmbAll = for (i <- 0 to 4) yield new ComboBox(List("---", "Single", "Double"))
And I try to listen to one of it via
listenTo(cmbAll(0).selection)
However, I can't actually perform the reactions.
reactions += {
case SelectionChanged(`cmbAll(0)`) => /** action here **/
}
All...