How to get the JFrame's "client rectangle"

When I run the code:
JFrame f = new JFrame();
f.setSize(640, 480);the frame has this size, but it includes the borders and the title bar.
How can I learn the thickness of the borders and the title bar - that is something calles "the client rectangle" in WinApi.

getContentPane().getSize();

Similar Messages

  • [6136] How-to get the initial IMPS client ?

    Hi, I have a Nokia 6136 which supports IMPS but with presence capability only. The chat capability has been removed by the operator but apparently, according to its support, it is possible to get the original configuration from Nokia. Is there a way to get the full IMPS client (with chat and presence capabilities) OTA ? Thanks for your help. -- kael

    Hi Aidar,
    Unfortunately, there are some insurmountable barriers in SAP. When a transaction calls another one using CALL TRANSACTION, a new internal mode is created, that cannot see the first one, except when programs communicate explicitly between the 2 using the SAP memory (get parameter id, set parameter id), ABAP memory (export to memory id/import from...), shared memory.
    Only Chen's answer makes sense here. You may also debug just before the CALL TRANSACTION 'FB05' or LEAVE TO TRANSACTION 'FB05' (by debug you can simply add a soft "breakpoint at statement" CALL TRANSACTION or LEAVE TO TRANSACTION to make the system halt automatically when the statement is reached) where you'll maybe find some data transferred to the memories I mentioned above, which you could then read from your code to know to say if it comes from FEBAN.
    Sandra

  • How to get the ADF Mobile Client extension

    Hi all,
    Please post some link in which I can download the ADF Mobile Client extension for Jdeveloper 11.1.1.4.0 directly to my local disk. I have tried going through Help --> Check for updates in Jdeveloper but my proxy does not
    allow it. so the only possible option for me is to download it to my local disk and should update it. I searched for it but was unable to find the appropriate link so I got to post here. Kindly help me out in finding it please....
    Thanks,
    Phanindra.

    Hi Timo,
    Now I am more confused whether it is available or not. In the oracle site I have seen that I can develop mobile apps using trinidad components in which <trinidad-config> file can be used to define the different platforms on
    which the application can be rendered. Is it true ?? When I created a mobile app I got only <trinidad-config> I didnt get <trinidad-skins> in which I can define the style sheet. There is a lot of confusion in how to proceed to
    develop the application. Kindly help me on this. I need to develop a mobile app which is not only accessible in Blackberry but should also be able to get rendered on the other platforms also. Which is the best way to develop a
    POC on this. Kindly help me timo.
    thanks,
    Phanindra.

  • How to get the ip of client that is using the server?

    I am doing a FTP like system using Java. I would like to get the time and the IP of the client that want to download the files from the system. Does anyone know the method to do so?

    If you're using plain sockets you may call socket's getInetAddress() or if you're using jsp / servlets you may call request.getRemoteAddr()

  • How to get the user input while server is waiting for client's message

    I have a server/client program (using sockets)
    I used a thread to let a server always waiting for client's request, but how should I found that
    there is no message pass to server from client.
    public void run(){
    while (true){
    Socket server = serverP.accept();
    ObjectInputStream inFromClient = new ObjectInputStream(server.getInputStream());
    inMessage = (Message)inFromClient.readObject();
    System.out.println("Deadlock may occurred, please enter your command: ");
    BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
    String command = inFromUser.readLine();
    The server is waiting for the inMessage that is passed from multiple clients. But if the server
    received no message after some time, it will assume something is wrong (eg, there is a
    deadlock), then it will ask the user to input the command to execute the method.
    If I put
    "System.out.println("Do you want to take Snapshot: ");
    BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
    String command = inFromUser.readLine();"
    inside the while loop, it will keep asking user to enter the input when every time the client
    connect to the server. But I want to ask the user to enter the command only when the server
    can't get the response from clients.
    How should I do?
    Please help.

    Your statement:
    Socket server = serverP.accept();
    it will block until Server receive connect request from client.
    So, what u can do is, create a seperate Thread which check if server is idle (no client connect to it) for a certain time.
    public class xxxxx extends Thread {
    public void run(){
       (new WatcherThread()).start()
       while (true){
       Socket server = serverP.accept();
       WatcherThread.acceptFlag();  
       ObjectInputStream inFromClient = new ObjectInputStream(server.getInputStream());
       inMessage = (Message)inFromClient.readObject();
       Do something with client request ...
       I suggest you to create a WorkerThread for
       each client request.
       For example:
       new (WorkerThread(inMessage)).start();
       This way, your server thread will immediately serve
       the next client request ASAP.
    public class WatcherThread extends Thread {
       private static accept = false;
       public static void acceptFlag() {
            flag = true;
       public void run() {
           while(true) {
               try { sleep(10000); } catch (Exception ex) { }
               if (!accept) { // never accepted after 10000 msecs
                  ... do your System.in here ...
               flag=false;          
    }The idea is, your server notify WatcherThread if a client connect. WathcerThread runs at seperate thread. It waits for 10000 msecs and check if Server ever gets connect request from server. If it doesn't then you can do your System.in, otherwise, it will wait for 10000 again..
    FYI, next time, please use [ code ] and [ / code ] to format your code. It discourage me to read plain whole-left-aligned code like yours.
    See: http://forum.java.sun.com/features.jsp#Formatting
    rgds,
    Alex

  • How to get the IP of the client when TCP connect in the server

    How to get the IP of the client when TCP connect in the server.
    The only parameter got from the connection is connectionID.
    Solved!
    Go to Solution.

    I guess you're using "TCP Wait on Listener" on the server. This returns the remote address and port (as optional outputs).

  • How to get the failover partner name from C++ client

    Hi All,
    I have configured the mirroring session for my application.
    I want to modify the connection string with failover partner name.
    Could any one please let me to know how to get the failover partner instance from C++ client dynamically.
    Thanks,
    Prasad.

    Are you looking for this?
    http://www.connectionstrings.com/sql-server-2012/
    http://stackoverflow.com/questions/25534972/auto-failover-multiple-connections-to-mirror-database-when-principal-goes-down

  • How to get the real client ip from HttpClusterServlet?

    Hi All,
              WL 6.0 sp2 on Linux.
              When HttpClusterServlet is used, invoking HttpServletRequest.getServerName()
              will return the server name of the proxy server where HttpClusterServlet
              installed,
              rather than the actual client's ip which we are interested in.
              Anybody knows how to get the correct client ip through the proxy server? Any
              workaround? Or does a patch exist?
              Any help will be appreciated,
              Lynch
              

    Sorry I mean HTTPServlet.getRemoteAddr()
              "Lynch" <[email protected]> ¼¶¼g©ó¶l¥ó
              news:3baea0c5$[email protected]..
              > Hi All,
              >
              > WL 6.0 sp2 on Linux.
              >
              > When HttpClusterServlet is used, invoking
              HttpServletRequest.getServerName()
              > will return the server name of the proxy server where HttpClusterServlet
              > installed,
              > rather than the actual client's ip which we are interested in.
              >
              > Anybody knows how to get the correct client ip through the proxy server?
              Any
              > workaround? Or does a patch exist?
              >
              > Any help will be appreciated,
              > Lynch
              >
              >
              

  • How to get the value from Advanced table

    Hi,
    In the Advanced table have 2 LOV fields, I need LOV field value dynamically in the controller to validate the save button, if iam not selected any value in lov save button will not allow to save the data. In the table i am using 'Add another row'. How to get the lov field value in the process form request??? and how to do this requirement
    Thanks
    Naresh

    1. You can specify required property on LOV field to "yes". For events where you wish to disable the client side validations, set the property disable client side validation to "true".
    2. If above behavior is not what you are looking for, then you need to handle in AM and not CO.
    a. Call an AM method from CO.
    b. In that AM method, get handle of VO.
    c. Iterate the VO Rows and check for your validation rules.
    -Prince
    http://www.princekapoor82.blogspot.com

  • How to get the Text name to pass in the  parameter header in save_text

    Hi,
      I am trying to change the long text of operation for historical order by using the flat file.I am using the save_text to do this.I would like to know how  to get the text name in order to pass the parameter header in save_text.
      I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates and where is this value updated in the table so that i can link it thru the order no  to get the link and pass it in the text_name.
      can anyone help me out?
    krishnan

    Hi,
    Your query is.
    I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates
    In above number
    300 - Client
    1000000092 - AUFPL - Routing number of operations in the order (You can fetch this from table HIVG)
    00000001 - APLZL - General counter for order ( You can fetch this from table HIVG).
    BR,
    Vijay

  • How to get the UDDI Key to publish a service provider system in SR?

    Hi,
    I am following instruction in appendix 1 & 2 of the white paper at https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1079b1af-dcb7-2b10-9ebb-eafcaa3cbbea?overridelayout=true
    trying to publish a service provider system into the service registry. One thing not clear to me is how to get the uddikey as needed in step 6 in appendix 1.
    My service registry is in a PI 7.1 SP4 system. I followed the instruction in appendix 2 but there is no uddi key displayed in the General tab. Please help.
    Regards,
    Jiannan
    Paragraph extracted from the whitepaper:
    There may be cases in which the NWA logical settings do not match the Services Repository
    settings when Visual Composer is trying to locate the enterprise services. Such cases can occur
    when there is no SLD ID definition of the physical system in the Services Repository.
    Currently, Visual Composer cannot search for services on a physical system with an empty SLD ID
    (which is not a valid one).
    To obtain this capability, the following steps should be performed to generate the necessary data
    for each system with a non-valid SLD ID, so that Visual Composer can search for services over it.
    1.Log on to http://<serverName>:<serverPort>/WSNavigator.
    2.Select the Services Registry radio button.
    3.In the Find field, enter sr and choose Go.
    4.Select the ServicesRegistrySi line and choose Next.
    5.Under the Operation Name, search for the publishPhysicalSystems operation, select it and choose Next.
    6.Fill the service information parameters with the following (see Appendix 2 for details on how to get this information) :
      6.1.Click the + icon in the physical system[].
      6.2.Deselect the Classifications checkbox.
      6.3.Click the + icon in the classificationReferenceGroups[].
      6.4.Click the + icon in the classificationReferences[].
      6.5.Deselect the classificationSystemKey checkbox.
      6.6.Deselect the uddiKey checkbox and enter the value <localUddiKey>.
      6.7.Deselect the value checkbox and enter the value <localSystemHostName>.
      6.8.Deselect the host checkbox and enter the value <localHostName>.
      6.9.Deselect the physicalSystemKey checkbox.
      6.10.Deselect the logical key checkbox and enter the value <System name>.<SystemHome>.<host name>.
      6.11.Deselect the systemName checkbox and enter the value <system name>.
      6.12.Deselect the type checkbox and enter the value 2.

    Hi Jiannan,
    No worries, you can go to UDDI client from the main page of PI  i.e. http://<serverName>:<serverPort>/
    And you use the search function for  the TModel for your Physical System. Search parameters can use the % wildcard.
    Hit the search and you find the UDDI Key for the Physical System.
    Cheers.
    Hemant Chahal

  • How to get the full path instead of just the file name, in �FileChooser� ?

    In the FileChooserDemo example :
    In the statement : log.append("Saving: " + file.getName() + "." + newline);
    �file.getName()� returns the �file name�.
    My question is : How to get the full path instead of just the file name,
    e.g. C:/xdirectory/ydirectory/abc.gif instead of just abc.gif
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    public class FileChooserDemo extends JFrame {
    static private final String newline = "\n";
    public FileChooserDemo() {
    super("FileChooserDemo");
    //Create the log first, because the action listeners
    //need to refer to it.
    final JTextArea log = new JTextArea(5,20);
    log.setMargin(new Insets(5,5,5,5));
    log.setEditable(false);
    JScrollPane logScrollPane = new JScrollPane(log);
    //Create a file chooser
    final JFileChooser fc = new JFileChooser();
    //Create the open button
    ImageIcon openIcon = new ImageIcon("images/open.gif");
    JButton openButton = new JButton("Open a File...", openIcon);
    openButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    int returnVal = fc.showOpenDialog(FileChooserDemo.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();
    //this is where a real application would open the file.
    log.append("Opening: " + file.getName() + "." + newline);
    } else {
    log.append("Open command cancelled by user." + newline);
    //Create the save button
    ImageIcon saveIcon = new ImageIcon("images/save.gif");
    JButton saveButton = new JButton("Save a File...", saveIcon);
    saveButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    int returnVal = fc.showSaveDialog(FileChooserDemo.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();
    //this is where a real application would save the file.
    log.append("Saving: " + file.getName() + "." + newline);
    } else {
    log.append("Save command cancelled by user." + newline);
    //For layout purposes, put the buttons in a separate panel
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(openButton);
    buttonPanel.add(saveButton);
    //Explicitly set the focus sequence.
    openButton.setNextFocusableComponent(saveButton);
    saveButton.setNextFocusableComponent(openButton);
    //Add the buttons and the log to the frame
    Container contentPane = getContentPane();
    contentPane.add(buttonPanel, BorderLayout.NORTH);
    contentPane.add(logScrollPane, BorderLayout.CENTER);
    public static void main(String[] args) {
    JFrame frame = new FileChooserDemo();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.pack();
    frame.setVisible(true);

    simply use file.getPath()
    That should do it!Thank you !
    It takes care of the problem !!

  • How to get the Change node in Production Server!!!!!

    Hi Guys,
    Kindly let me know how to get the Change node in Production Server for the Transaction Code Pe03 for generating the Acknowledgement No for the year 2008 .
    Plz provide me the steps how to get the Change Node for Acknowledgement No so tat i can get the configuration done.
    Regards
    Ansuman Mohanty.

    Hi Mr!
    If you want to generate the e-file feature 40ACK, do it in our Customization client box (Golden box) & save the request & move to Quality & production.
    Still if you need to workout only in Production, than with the help of Basis people you can get the Production change mode for 5 to 10 min time & can generate it. But mostly Basis people wont give us change mode for Production box ... with ur request they can do..try it.
    Did u collected 4 quarter TAN no's for 2008 Quarter...if not collect it & generate it at a time.
    All the best:-)
    Kind Regards,
    Saisree.S

  • How to get the row Count of a ResultSet

    How to get the row Count of a ResultSet

    Hi
    I'v tried rennie1's way ,but I only get zero,my code is:
    rs.executeQuery("select count(*) from t_test");
    if (rs.next()) int rowCount=rs.getInt(1);
    I also tried barni's way ,but the method rs.last() and rs.beforeFirst() throw a same Exception
    I tried another way,the code is:
    while rs.next(){
    // Do nothing ,just move the cursour to the last row
    int rowCount=rs.getRow()
    However,the rowCount still equal zero
    Any help would be greatly apprecite!
    note:
    I get connection by DataSource's JNDI name from client, the Server is Weblogic Server 6, the DBMS is Oracle.

  • How to get the information of the log related to t.code generated by basis.

    In the log generated by the basis personnel we found the details of user and corresponding t.code used details.  How to get the information reg. which document he went into using this t.code? For example me29 t.code used by 'x' user.  The log is showing time date t.code and user.  By using me29n which document he attended is the requirement. How to get this information. Let me know it pl.
    TS

    Thanks all for the help.
    Here is my solution. A mix from Julian and Thomas.
    In future I will encapsulate the code in a function module.
    DATA: BEGIN OF usr_tabl OCCURS 10.
            INCLUDE STRUCTURE uinfo.
    DATA: END OF usr_tabl.
    DATA: th_opcode(1) TYPE x.
    DATA: LV_TID LIKE  SY-INDEX.
    CONSTANTS: opcode_list LIKE th_opcode VALUE 2.
    CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_list
      ID 'TAB' FIELD usr_tabl-sys.
    CALL FUNCTION 'TH_USER_INFO'
      EXPORTING
        CLIENT = sy-mandt
        USER   = sy-uname
      IMPORTING
        TID    = LV_TID.
    read table usr_tabl with key tid = lv_tid.
    IF sy-subrc = 0.
      CASE usr_tabl-type.
        WHEN 2.
          write :/ usr_tabl-type, 'SYSTEM'." (system)
        WHEN 4.
          write :/ usr_tabl-type, 'GUI'." (Gui)
        WHEN 32.
          write :/ usr_tabl-type, 'RFC'."(RFC)
        WHEN 202.
          write :/ usr_tabl-type, 'PLUG-IN'." (Plug-in &).
      endcase.
    ENDIF.

Maybe you are looking for

  • No aggragation when combining reports

    Hello all, I combined 2 reports with each other in answers. The first one is a dim with 2 different fact values from 2 different fact tables and the second one is the dimension with a 2 columns with null values Now I got something like: A -1 - 1 A -

  • Is iwork the solution for uploading spreadsheets from a PC to view on a ipad?

    Is iwork the solution for uploading spreadsheets from a PC to view on a ipad?

  • Help me with this code please

    Hello, This is the first program that I have attempted to write alone....and I am stuck. I am trying to acquire data from a scope. I want the vi to only load the scope setup the first time the code is executed. Once the setup has been loaded I just w

  • Max file size for Portal Upload

    Hi, Our portal is EP6 SP2 Patch 5. Our users try to upload 200 MB document and it is failing. Any one of you know what is the limiatation of the size.?? Any help would be a great help. Ravi

  • Undesired Speck on iphone 3G screen

    Can anyone advise me, on the the best course of action I can take regarding a "speck" (fleck, spot etc.) of somekind that some how got on the LCD screen from the inside. It can go un-noticed if your not aware it's there, but I do and have over analyz