alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (README)

This example Scala source code file (README) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

a, in, in, java, java, note, radiobutton, swing, swing, the, the, there, this, visual

The Scala README source code

scala.swing BETA

This is a UI library that will wrap most of Java Swing for Scala in a straightforward manner. 
The widget class hierarchy loosely resembles that of Java Swing. The main differences are:

  In Java Swing all components are containers per default. This doesn't make much sense for 
  a number of components, like TextField, CheckBox, RadioButton, and so on. Our guess is that 
  this architecture was chosen because Java lacks multiple inheritance. 
  In scala.swing, components that can have child components extend the Container trait.
  
  Layout managers and panels are coupled. There is no way to exchange the layout manager 
  of a panel. As a result, the layout constraints for widgets can be typed. 
  (Note that you gain more type-safety and don't loose much flexibility here. Besides 
  being not a common operation, exchanging the layout manager of a panel in Java 
  Swing almost always leads to exchanging the layout constraints for every of the panel's 
  child component. In the end, it is not more work to move all children to a newly created 
  panel.)
   
  The event system. TODO
  

The library comprises three main packages:

  scala.swing
    All widget classes and traits.
    
  scala.swing.event
    The event hierarchy.

  scala.swing.test
    A set of demos.
    

Notes:

Visual appearance of combo boxes using the GTK LaF is broken on JDKs < 1.7b30. 
This is a Java Swing problem.

To download the latest version, go to http://lamp.epfl.ch/~imaier or use sbaz.

Other Scala examples (source code examples)

Here is a short list of links related to this Scala README source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.