Size in nullLayout from own components

hi there,
I have a null layout JPanel in which the user can add some components.
The height and the width of the components are different and can be changed, by setting a text into it and so on.....
I add the component by
setBound(x, y, 200, 200) x = x-coodinate y = y-coodinate
it works fine, but I want to add the component with its real width and real height not 200, 200.
how can I do that?
I wrote some methods for the component called setWholeWidth(int) and getWholeWidth()
If I call setWholeWidth() in the constructor it works but if I call setWholeWidth(int) in the paint-method it do not want to work. The wholeWidth variable is set but if the paint() method comes to its end, the variable will be reset to null
how can I fix this problem?
some additional informations: the user is able to manipulate the text, fontsize etc at runtime, wich means the size of the component could be changed every time

the problem is, the dimensions are set to 10, 10 and I cant manipulate them in paint(graphics g)
if I call setPrefferedSize(x, y) in the paint(graphics g) method, it wont take effect the dimension are still set to 10, 10

Similar Messages

  • Connecting to a database from Business Components JSP Application

    Hallo All!
    Can anybody give me an advice about connecting to a database from Business Components JSP Application? In all examples I see that Oracle user name and password placed in configuration file.
    How can user provide his own name and password to start Oracle session and how then hi can close this session?
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Dmitri:
    Dear Laura,
    I mean first variant where the database would be the same:
    scott/tiger@database1
    foo/bar@database1
    Of course I understand that we must register every user in database by "CREATE USER XXX" and it is unacceptable for Internet. But it may be very convenient for an Intranet because we can build access restriction based on set of views without any changes in applications.
    Best wishes,
    Dmitri.<HR></BLOCKQUOTE>
    null

  • Extend XCM with own components

    Hello,
    in CRM-ISA 3.0 I have extended the web.xml-file with some parameters or own properties-files to configure self-developed extensions of the b2b- or b2c-application.
    After migration to CRM 4.0 it would make sense to reegineer this things into own XCM-components to simplify the configuration and to avoid unnecessary modifications on file level.
    So I have the following questions:
    1. Do you know any documention about how the XCM can be extended by own components?
    Or better:
    2. Did anyone extend the XCM by own components and parameters and can give me a cookbook how this can be done?
    With best regards,
    Holger Dittrich

    Hi Holger,
    Yes you can create custom components in scm settings. Follow the sap isa dev guide which is available for download in the service market place.
    You have to download the config xml file from the start-> general page of xcm settings and edit its content with required custom component and upload it back to the backend system. Note : take the backup of the original.
    Add this code to the file and upload back
    <component id="project">
    <configs>
    <config id="projectconfig">
    <params id="default">
    <param name="myParam" value="defaultValue"/>
    </params>
    </config>
    </configs>
    </component>
    then change the code of xcmadmin-config.xml file from web-inf/xcm/customer/modification.
    <?xml version="1.0" encoding="UTF-8"?>
    <xcmadmin>
    <componentmetadata>
    <component id="project" shorttext="Project specific setting" scope="application">
    <longtext>Detailed overview on parameters configured here</longtext>
    <params>
    <param name="myParam" type="text" shorttext="custom parameter"/>
    </params>
    </component>
    </componentmetadata>
    <scenariometadata>
    <!-- add additional scenariometadata here -->
    </scenariometadata>
    </xcmadmin>
    add this code.
    Deploy and restart the application.
    Hopefully this is helpfull
    Regards
    Bharath.

  • Hello ! how to change document sizes and use our own size (not A3, A2 ...) thank you !

    hello ! how to change document sizes and use our own size (not A3, A2 ...) thank you !

    Experiment. No harm in trying.
    If you are just starting to use Pages you need to make your own assessment given current events whether committing your work to a format and software given this support is a wise move.
    You also need to look at what will produce workable results. Particularly if your large posters are to be commercially printed and contain large bitmap (photographic) images.
    Always work backwards from your output. Ask your printer what they require to do their job.
    Peter

  • My premiere project file size just went from 190MB to 5.61GB... and now it won't open! Anyone know how this happened?

    My premiere project file size just went from 190MB to 5.61GB... and now it won't open! Anyone know how this happened? Or how to prevent it from happening again? Thankfully I saved a backup project of the 190MB file size.

    warp stabiliser?

  • Have CS5 and CS6.  Need to reduce size of file from 6Mb to 2 Mb for contest purposes without losing original

    Have CS5 and CS6.  Need to reduce size of file from 6Mb to 2 Mb for contest purposes without losing original

    Just save the document to a new jpeg file name using a lower quality setting or re-size the image down in  size the save a high quality smaller new jpeg image.

  • Support Message enhancement with own components

    Hi all,
    We need to enhance our Support messages (service desk) with our own components. With Help -> Create customer message (in satelitte systems) you can only choose the SAP Standard components. We have a lot of own developed "products" in the SAP System. The users with problems should be able to choose a special component. Can someone help us? I guess this is also an interesting question for other customers...
    With Best regards

    Hi,
    If you ask me I will definitely say "Not Possible". It is the application heirarchy of SAP, the core of the functionalities. Ask your development experts if they can try for some enhancements. Hinduja was right on this. You need to make enhancements in each of your satellite systems.
    I heard about something called as incident management. I don't know whether it is possible but still you can spend a bit of time on incident management, it might come to your rescue. Please let me know if you find some solution.
    Feel free to revert back.
    --Ragu

  • How is it posible to get the File name, size and type from a File out the H

    How is it posible to get the File name, size and type from a File out the HttpServletRequest. I want to upload a File from a client and save it on a server with the client name. I want to conrole before saving the name, type and size of the file.How is it posible to get the File name, size and type from a File out the HttpServletRequest.
    form JSP
    <form name="form" method="post" action="procesuploading.jsp" ENCTYPE="multipart/form-data">
    File: <input type="file" name="filename"/
    Path: <input type="text" readonly="" name="path" value="c:"/
    Saveas: <input type="text" name="saveas"/>
    <input name="submit" type="submit" value="Upload" />
    </form>
    proces JSP
    <%@ page language="java" %>
    <%@ page import="java.util.*" %>
    <%@ page import="FileUploadBean" %>
    <jsp:useBean id="TheBean" scope="page" class="FileUploadBean" />
    <%
    TheBean.doUpload(request);
    %>
    BEAN
    import java.io.*;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletInputStream;
    public class FileUploadBean {
    public void doUpload(HttpServletRequest request) throws IOException
              String melding = "";
              String filename = request.getParameter("saveas");
              String path = request.getParameter("path");
              PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("test.java")));
              ServletInputStream in = request.getInputStream();
              int i = in.read();
              System.out.println("filename:"+filename);
              System.out.println("path:"+path);
              while (i != -1)
                   pw.print((char) i);
                   i = in.read();
              pw.close();
    }

    Thanks it works great.
    Here an excample from my code
    import org.apache.commons.fileupload.*;
    public class FileUploadBean extends Object implements java.io.Serializable{
    String foutmelding = "geen";
    String path;
    String filename;
    public boolean doUpload(HttpServletRequest request) throws IOException
         try
         // Create a new file upload handler
         FileUpload upload = new FileUpload();
         // Set upload parameters
         upload.setSizeMax(100000);
         upload.setSizeThreshold(100000000);
         upload.setRepositoryPath("/");
         // Parse the request
         List items = upload.parseRequest(request);
         // Process the uploaded fields
         Iterator iter = items.iterator();
         while (iter.hasNext())
         FileItem item = (FileItem) iter.next();
              if (item.isFormField())
                   String stringitem = item.getString();
         else
              String filename = "";
                   int temp = item.getName().lastIndexOf("\\");
                   filename = item.getName().substring(temp,item.getName().length());
                   File bestand = new File(path+filename);
                   if(item.getSize() > SizeMax && SizeMax != -1){foutmelding = "bestand is te groot.";return false;}
                   if(bestand.exists()){foutmelding ="bestand bestaat al";return false;}
                   FileOutputStream fOut = new FileOutputStream(bestand);     
                   BufferedOutputStream bOut = new BufferedOutputStream(fOut);
                   int bytesRead =0;
                   byte[] data = item.get();
                   bOut.write(data, 0 , data.length);     
                   bOut.close();
         catch(Exception e)
              System.out.println("er is een foutontstaan bij het opslaan de een bestand "+e);
              foutmelding = "Bestand opsturen is fout gegaan";
         return true;
         }

  • Unable to save a 'smallest size file' pdf from illustrator 5.5

    We recently insalled Adobe Standard 5.5
    I often save PDF files from Illustrator using the built in PDF options available from the PDF drop down menu bar when saving files. Usually I will save a visual as a 'smallest file size' or make use of the 'high quality print' option for other files etc.
    Why cant I do this on CS5.5?
    In addition, the colour is not acurate at all!
    Please help

    Hi Scott - I found the following thread on the net. So I had a look on my time machine back-ups and copied the files from there, which I then pasted into my Settings folder as you suggested.
    Ta da!! All working again!
    Any idea how I could restore these settings from a backup?
    Thanks!
    The PDF presets reside in Root/Library/Application Support/Adobe/Adobe PDF/Settings/
    After I had installed 10.6.5, 6 preset files were removed from the Settings folder. The folder tree itself remained, it was just that some of the contents of "Settings" were deleted. I have fixed the problem by copying the deleted settings files from a backup.
    These are the files which were deleted:
    Smallest File Size.joboptions
    Press Quality.joboptions
    PDFX4 2008.joboptions
    PDFX3 2002.joboptions
    PDFX1 2001.joboptions
    High Quality Print.joboptions
    These files were not deleted:
    Standard.joboptions
    PDFA1b 2005 RGB.joboptions
    PDFA1b 2005 CMYK.joboptions
    Oversized Pages.joboptions
    Somebody at Adobe community support for Indesign directed me to restore these files from a backup, which solved the problem.
    Re: Unable to save a 'smallest size file' pdf from illustrator 5.5 

  • My photos shrink in size when emailed from IPHOTO or attached - How can I fix this. My friends say they can't see my pictures... thanks!!

    My photos shrink in size when emailed from IPHOTO or attached - How can I fix this. My friends say they can't see my pictures... thanks!!

    When you email from iPhoto, you have a choice as to the size of the picture - choose medium and your friends will be able to see them.  By the way, do your friends click on the photo attachment  in the mail to open it?

  • Determine size of pdf from spool

    All,
    does anyone know how to determine size of pdf from spool.
    i'm using RSPO_RETURN_ABAP_SPOOLJOB to get pdf file, but i want to know its size.
    any idea?

    Assume the PDF data is in internal table gt_messg_att.
    MOVE p_spoolno TO lv_spoolno.
    * CONVERT THE SPOOL TO PDF
      CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid                    = lv_spoolno
          no_dialog                      = lc_no_dialog
    *     DST_DEVICE                     =
    *     PDF_DESTINATION                =
       IMPORTING
         pdf_bytecount                  = lv_bytecount
    *     PDF_SPOOLID                    =
    *     OTF_PAGECOUNT                  =
    *     BTC_JOBNAME                    =
    *     BTC_JOBCOUNT                   =
       TABLES
         pdf                            = gt_pdf_output
       EXCEPTIONS
         err_no_otf_spooljob            = 1
         err_no_spooljob                = 2
         err_no_permission              = 3
         err_conv_not_possible          = 4
         err_bad_dstdevice              = 5
         user_cancelled                 = 6
         err_spoolerror                 = 7
         err_temseerror                 = 8
         err_btcjob_open_failed         = 9
         err_btcjob_submit_failed       = 10
         err_btcjob_close_failed        = 11
         OTHERS                         = 12
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
    * Transfer the 132-long strings to 255-long strings
        LOOP AT gt_pdf_output INTO wa_pdf_output.
          TRANSLATE wa_pdf_output USING ' ~'.
          CONCATENATE v_buffer wa_pdf_output INTO v_buffer.
          MODIFY gt_pdf_output FROM wa_pdf_output.
          CLEAR wa_pdf_output.
        ENDLOOP.
    * TO CONVERT THE DATA INTO PDF FORMAT ELSE THE PDF FILE
    * WON'T OPEN & REPORT WOULD GIVE A MESSAGE THAT
    * THE FILE IS DAMAGED & COULD NOT BE OPENED
        TRANSLATE v_buffer USING '~ '.
        CLEAR : wa_messg_att,
                gt_messg_att.
        DO.
          wa_messg_att = v_buffer.
          APPEND wa_messg_att TO gt_messg_att.
          SHIFT v_buffer LEFT BY 255 PLACES.
          IF v_buffer IS INITIAL.
            EXIT.
          ENDIF.
          CLEAR wa_messg_att.
        ENDDO.
      ENDIF.
    * Get size of attachment
      DESCRIBE TABLE gt_messg_att LINES lv_cnt.
      READ TABLE gt_messg_att INTO wa_messg_att INDEX lv_cnt.
      lwa_doc_data-doc_size =  ( lv_cnt - 1 ) * 255 + STRLEN( wa_messg_att ).

  • C6-00: Size of update from v20 to v40 with SW upda...

    hello.
    my current C6-00 firmware version is v20. in SW update program first item is "software update (important)". other update items like facebook update have size (example 500KB). but first item "Software update (important)" don't have size.
    my internet speed is not good because i want to know :
    Size of update from v20 to v40 with SW Update program in C6-00???
    sorry for weak english language

    It is around 5 to 6 MB depending upon your region.
    In Love With My C6-01:Now running on Nokia Belle!

  • Accessing images from shared components

    I am having problem finding out images from shared components. After loading my images from my desktop to shared components folder, when i try to create an image item, and click the browse button, it pulls out my hard drive for selection. i don't know how to get the images already in shared components. i read in the help file that if i know the name of the image, then i can write it down and portal will pull it out. but what if i don't remember. do i have to go to shared components to find what it is and then come back and write it in the textbox?how to get to shared components clicking browse and selecting the image we want which is already stored in portal?
    thanks
    valli

    There's no way to browse and select the images in shared components. You need to know the URL to the image if you want to reference it in an item.

  • After system copy u0131 see PSAPTEMP size is 0 from db02

    hi
    our system is sap ecc6 on oracle 10g  (aix 5.3)
    after system copy ı see psaptemp table size is 0.original size is 2gb from prod system
    using brtools ı added a new file for psaptemp then  ı did a  stop/start  and ı saw 2gb for psaptemp
    ı checked file location for psaptemp in file system  that it is ok.
    after every system copy should  I  did  this action ?
    have you got any ideas?

    Hi,
    Sounds like you did a tape restore from prod to QA
    Did you use  alter database backup controlfile to trace from your prod system for the rebuild ?
    At the base of the trace file there would  be the syntax to create the PSAPTEMP file.
    Looks like you have deleted that bit....
    No big worries if it's missing as long as you put it in before using the system in anger....
    Put in your notes to add the PSAPTEMP file in after  you opened the database sucessfully.
    Mark

  • Text font size changed automatically from normal to huge

    What could cause the font size to go from normal to huge?

    Thanks for the note.  I gave up on the Verizon site (there was no place to go to get one of those FAQ answered) and went to Bing and asked the question, hit the return key and found the answer in the first search topic that came up.  It did give me the answer of increase or decrease font size using the volume keys on the side of the phone.  Now you can disable that particular function so you don't accidentally increase the font size.  Thanks again.

Maybe you are looking for

  • Cabinet On my line?

    Hi all , Sorry if this gets posted in the wrong section as im new to this . But i was wondering how can i find out if i have a cabinet on my line?. as i was told theres 2 different types of line 1 where the exchange goes to the cabinet an then from t

  • Deletion of compressed request

    Hi I have two compressed in InfoCube Req A - 200 records Timestamp 2008 Req B - 300 records Timestamp 2007 Now I want to delete the request "B" from the Cube which is beneath req A in the Cube. I have already deleted the data for the Req B via select

  • ALV Block Display with filet ............ Urget Please..............

    Hello All, Hello All, I am Working on ALV Block List Report. In that report i am having two Blocks. if i set a filter for one block it is filtering that block, the second block remains constant. My requirment is like this if iam setting a filter for

  • Dynamically changing the size of KM document IView.

    Hi All, At present the framework page has 3 KM document Iview. All iviews are calling HTML files. Now if the content in HTML file increases, I get an scroll bar for that Iview. Also based on the resolution of the screen I get the scrollbar. e.g I hav

  • Encore CS6 Dynamic Link from Pr CS6 Problem/Issue

    I switched from Production Premium CS5 to CS6.  I first deactivated and uninstalled my CS5 then installed CS6 on my Windows 7 machine. The problem: When I edit together a video in Premiere CS6 and have finished, I use Dynamic Link from within Encore