Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JTabbedPane title alignment

viklund_andersOct 6 2010 — edited Oct 9 2010
Hi,

I need guidance how to align the tab title text
"Right" title - right alignment
"Left" title -left alignment

Thanks!
import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;

public class MainClass {
  static void addIt(JTabbedPane tabbedPane, String text) {
    JLabel label = new JLabel(text);
    JButton button = new JButton(text);
    JPanel panel = new JPanel();
    tabbedPane.addTab(text, panel);
  }

  public static void main(String[] args) {
    JFrame f = new JFrame("JTabbedPane Sample");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JTabbedPane tabbedPane = new JTabbedPane( JTabbedPane.LEFT);
    addIt(tabbedPane, "Tab One long title");
    addIt(tabbedPane, "Right"); //why is this title centered?
    addIt(tabbedPane, "Left");  //why is this title centered?
    f.add(tabbedPane);
    f.setSize(300, 200);
    f.setVisible(true);
  }
}
Edited by: user6102378 on 2010-okt-07 10:04

Comments

Sudipto Desmukh

Any ideas guys?

Sandeep Kumar sk

I know that this file ObAccessClient.xml.lck is generated when webserver starts. One should not delete this lck file for a running server. You may delete this file only after stopping the server. This file is used by webgate.

The httpd.pid file is used the running webserver. So don't delete these two files. At least I am sure about these two files should not be deleted for a running webserver. After webserver server is stopped the file ObAccessClient.xml.lck  can be deleted. The size of this file ObAccessClient.xml.lck is 0 bytes (I think so...)

Sudipto Desmukh

Thanks, i'm aware of these. But this still doesn't explain the OHS crash, I can understand why OHS won't start when these files are not present, but weird that OHS would crash hours after the cronjob has deleted these files.

Sandeep Kumar sk

Hi Sudipto,

Here is explaination why httpd.pid file is required for a running http server. http://chestofbooks.com/computers/webservers/apache/Stas-Bekman/Practical-mod_perl/5-3-3-Finding-the-Right-Apache-PID.html#.VOaXn5jF_q1

The http server from Oracle is derived from Apache server and when Apache server starts it writes its pid into this file. When any signal needs to be sent to this process (process being the httpd daemon process), the pid of the process should be known- this is available from the httpd.pid file. Hence the presence of this file is required during the lifetime of a running httpd server. If this file is missing/deleted then there is no way to contact the httpd daemon process- since the pid is not known.

Also I have noticed few times when httpd server has an issue due to resources or not started properly etc the presence of this file from a previous running httpd server causes issues during starting of fresh httpd server. I had to delete the httpd.pid file for the zombie httpd server in order to restart http server.

I have also noticed similar behavior with ObAccessclient.xml.lck file. These .lck files are lock files which provide the server process read/write locks. Hence these are required during the runtime of the http server process/webgate. Also sometimes when http server has issues or needs to be restarted one needs to delete this .lck file from the previous run. I think if the http server is shutdown gracefully this file should get deleted automatically but sometimes this file exists then it causes issues with restarting http server.

Here is a blog which cautions not to delete the lck files (similar to the 4 files you posted)Chuni Lal Kukreja OAM, OIM, Webgate,Active Directory,SharePoint 2013,IIS7.5,OAAM Blog: Lock Files in OAM 11g R2PS2

Hope this helps. Please mark the answer as solved/helpful if it resolves your issue.

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 6 2010
Added on Oct 6 2010
11 comments
8,176 views