Changes to swing and some other classes for communication to gui
purposes.