//package tideCalendar; import javax.swing.*; import java.awt.*; import javax.swing.plaf.basic.BasicArrowButton; import javax.swing.border.AbstractBorder; public class WeekScrollBar extends JPanel { public WeekScrollBar() { super(); setLayout(new GridLayout(1,2)); setBackground(Format.STDBLUE); setPreferredSize(new Dimension(75,500)); BasicArrowButton buttonator = new BasicArrowButton(SwingConstants.NORTH) { public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { int[] xpos = new int[5]; int[] ypos = new int[5]; xpos[0] = x-size/2; xpos[1] = x+size/2; xpos[2] = x+3*size/2; xpos[3] = x+size/2; xpos[4] = x-size/2; ypos[0] = y-size/2; ypos[1] = y+3*size/2; ypos[2] = y-size/2; ypos[3] = y+size; ypos[4] = y-size/2; g.fillPolygon(xpos, ypos, 5); xpos[0] = x-size/4; xpos[1] = x+size/2; xpos[2] = x+5*size/4; xpos[3] = x+size/2; xpos[4] = x-size/4; ypos[0] = y-size/2; ypos[1] = y+3*size/4; ypos[2] = y-size/2; ypos[3] = y+size/2; ypos[4] = y-size/2; g.fillPolygon(xpos,ypos,5); } }; buttonator.setBorder(Format.STDBORDER); buttonator.setBackground(Format.MONTH1); add(buttonator); } public static void main(String args[]) { JFrame myFrame = new JFrame("PANEL"); WeekScrollBar ScrollBar = new WeekScrollBar(); myFrame.setBounds(100,100,75,500); myFrame.getContentPane().add(ScrollBar); myFrame.setVisible(true); } }