rendered paste bodyimport javax.swing.*;import java.awt.*;import java.awt.event.*;class Segment extends Box { JProgressBar progress; JLabel titleLabel,infoLabel,miscLabel; JButton button; public Segment(){ super(BoxLayout.Y_AXIS); titleLabel = new JLabel("Title"); infoLabel = new JLabel("Information"); miscLabel = new JLabel("Misc"); button = new JButton("Click me"); progress = new JProgressBar(); progress.setIndeterminate(true); progress.setString("Unknown Duration"); progress.setStringPainted(true); Box hbox1 = Box.createHorizontalBox(); hbox1.add(titleLabel,Component.LEFT_ALIGNMENT); Box hbox2 = Box.createHorizontalBox(); hbox2.add(progress); hbox2.add(button); Box hbox3 = Box.createHorizontalBox(); hbox3.add(infoLabel); hbox3.add(miscLabel); this.add(hbox1); this.add(hbox2); this.add(hbox3); } public void setLabels(String s1,String s2, String s3){ this.titleLabel.setText(s1); this.infoLabel.setText(s2); this.miscLabel.setText(s3); } public void setProgress(){ }}