How can I put text in Tab into vertical alignment?
Dear friends, I have following code,
package com.swing.test;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.SwingConstants;
publicclass NewTabbedPane{
private JFrame frame;
/**
* Launch the application
* @param args
*/
publicstaticvoid main(String args[]){
try{
NewTabbedPane window =new NewTabbedPane();
window.frame.setVisible(true);
}catch (Exception e){
e.printStackTrace();
}
}
/**
* Create the application
*/
public NewTabbedPane(){
initialize();
}
/**
* Initialize the contents of the frame
*/
privatevoid initialize(){
frame =new JFrame();
frame.setBounds(100, 100, 500, 375);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
final JPanel panel =new JPanel();
panel.setLayout(new BorderLayout());
frame.getContentPane().add(panel, BorderLayout.CENTER);
final JTabbedPane tabbedPane =new JTabbedPane();
tabbedPane.setTabPlacement(SwingConstants.LEFT);
panel.add(tabbedPane, BorderLayout.CENTER);
final JTabbedPane tabbedPane_1 =new JTabbedPane();
tabbedPane.addTab("AAAAA", null, tabbedPane_1,null);
final JTabbedPane tabbedPane_2 =new JTabbedPane();
tabbedPane.addTab("BBBBB", null, tabbedPane_2,null);
final JTabbedPane tabbedPane_3 =new JTabbedPane();
tabbedPane.addTab("CCCCC", null, tabbedPane_3,null);
}
}
but here all tabs' title AAAAA, BBBBB, CCCC are aligned horizontally, I need them to align vertically, Any guru can help?
Thanks
sunny

