* Creates a new panel.
*/
public JPEGOptionPanel() {
super(new GridBagLayout());
ExtendedGridBagConstraints constraints =
new ExtendedGridBagConstraints();
constraints.insets = new Insets(5, 5, 5, 5);
constraints.weightx = 0;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.NONE;
constraints.setGridBounds(0, 0, 1, 1);
add(new JLabel(resources.getString("JPEGOptionPanel.label")),
constraints);
quality = new JSlider();
quality.setMinimum(0);
quality.setMaximum(100);
quality.setMajorTickSpacing(10);
quality.setMinorTickSpacing(5);
quality.setPaintTicks(true);
quality.setPaintLabels(true);
quality.setBorder(BorderFactory.createEmptyBorder(0,0,10,0));
Hashtable labels = new Hashtable();
for (int i=0; i < 100; i+=10) {
labels.put(new Integer(i), new JLabel("0."+i/10));
}
labels.put(new Integer(100), new JLabel("1"));
quality.setLabelTable(labels);
Dimension dim = quality.getPreferredSize();
quality.setPreferredSize(new Dimension(350, dim.height));
constraints.weightx = 1.0;
constraints.fill = GridBagConstraints.HORIZONTAL;
constraints.setGridBounds(1, 0, 1, 1);
add(quality, constraints);
}