Pardon my ignorance but what is Shift?
edit: you mean, invert the order?
Works fine but dunno if this is what you mean?Code:import java.awt.*; import java.awt.event.*; import javax.swing.*; public class sample extends JFrame{ public sample(){ setTitle("Sample"); setSize(400,300); setDefaultCloseOperation(EXIT_ON_CLOSE); getContentPane().add(new ToolBar(),BorderLayout.NORTH); } // ToolBar class ToolBar extends JToolBar{ JButton redo=new JButton("Redo",new ImageIcon("left.gif")), refresh=new JButton("Refresh",new ImageIcon("middle.gif")), help=new JButton("Help",new ImageIcon("right.gif")); public ToolBar(){ setFloatable(false); redo.setVerticalTextPosition(AbstractButton.BOTTOM); redo.setHorizontalTextPosition(AbstractButton.CENTER); redo.setToolTipText("Update Database"); refresh.setVerticalTextPosition(AbstractButton.BOTTOM); refresh.setHorizontalTextPosition(AbstractButton.CENTER); refresh.setToolTipText("Refresh Table"); help.setVerticalTextPosition(AbstractButton.BOTTOM); help.setHorizontalTextPosition(AbstractButton.CENTER); help.setToolTipText("Help"); //add(redo); //add(refresh); //add(help); add(help); add(refresh); add(redo); } } public static void main(String[] args){ new sample().show(); } }![]()





Reply With Quote