# Class SwingPainter

java.lang.Object
uk.ac.starlink.ttools.plottask.SwingPainter

All Implemented Interfaces:
  `Painter`

public class SwingPainter extends Object implements Painter
Painter subclass which can paint to the screen. It has a `postComponent(Component)` method additional to the Painter interface which allows a component to be submitted directly, if one is available.

Since:
  20 Jan 2012
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`SwingPainter(String winTitle)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`paintPicture(Picture picture)`
Export the graphics contained in a Picture.
`void`
`postComponent(Component comp)`
Displays a screen component directly.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SwingPainter

public SwingPainter(String winTitle)
Constructor.

Parameters:
  `winTitle` - window title to use for the container frame

## Method Details

### paintPicture

public void paintPicture(Picture picture)
Description copied from interface: `Painter`
Export the graphics contained in a Picture.

Specified by:
  `paintPicture` in interface `Painter`
Parameters:
  `picture` - graphics to export

### postComponent

public void postComponent(Component comp)
Displays a screen component directly.

Parameters:
  `comp` - screen component