Moderator: JIDE Support
final JideTabbedPane tabbedPane = new JideTabbedPane(JideTabbedPane.TOP) {
private void superUpdateUI() {
super.updateUI();
}
@Override
public void updateUI() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
superUpdateUI();
}
});
}
};
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
public void updateUI()
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
MyTabbedPane.super.updateUI();
}
}
);
}
public void repaint()
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
MyTabbedPane.super.repaint();
}
}
);
}
public static void main(String[] args)
{
MySplashWindow splashWindow = new MySplashWindow();
splashWindow.setVisible(true);
DemoFrame frame = new DemoFrame();
frame.setExtendedState(DemoFrame.MAXIMIZED_BOTH);
frame.setVisible(true);
splashWindow.setVisible(false);
}
public static void main(String[] args)
{
MySplashWindow splashWindow = new MySplashWindow();
splashWindow.setVisible(true);
SwingUtility.invokelater(new Runnable()
{
public void run()
{
DemoFrame frame = new DemoFrame();
frame.setExtendedState(DemoFrame.MAXIMIZED_BOTH);
frame.setVisible(true);
}
}
);
splashWindow.setVisible(false);
}
public void addTab(String title, Icon icon, Component component, String toolTipText, boolean isClosable)
{
super.addTab(title, icon, component, toolTipText);
if (isClosable)
{
setTabClosableAt(indexOfComponent(component), isClosable);
}
}
final JideTabbedPane tabbedPane = new JideTabbedPane(JideTabbedPane.TOP);
final JideTabbedPane tabbedPane = new JideTabbedPane(JideTabbedPane.TOP) {
public void addTab(String title, Icon icon, Component component, String toolTipText, boolean isClosable) {
super.addTab(title, icon, component, toolTipText);
if (isClosable) {
setTabClosableAt(indexOfComponent(component), isClosable);
}
}
};
for (int i = 0; i < titles.length; i++) {
JScrollPane scrollPane = new JScrollPane(new JTextArea());
scrollPane.setPreferredSize(new Dimension(530, 530));// why setPreferredSize here?
tabbedPane.addTab(titles[i], icons[i], scrollPane);
tabbedPane.setMnemonicAt(i, mnemonics[i]);
}
for (int i = 0; i < 300; i++) {
JScrollPane scrollPane = new JScrollPane(new JTextArea());
// scrollPane.setPreferredSize(new Dimension(530, 530));
tabbedPane.addTab(titles[i % titles.length], icons[i % titles.length], scrollPane);
tabbedPane.setMnemonicAt(i, mnemonics[i % titles.length]);
}
public static void main(String[] args)
{
new SplashWindow().setVisible(true); // this is a Thread instance, so it will cause the no-safety-thread error.
new DemoFrame().setVisible(true);
}
new SplashWindow().setVisible(true);
SwingUtilities.invokerLater()
{
public void run()
{
new DemoFrame().setVisible(true);
}
}
Return to JIDE Common Layer Open Source Project Discussion (Community Driven)
Users browsing this forum: No registered users and 3 guests