TextArea sizing question

hi,
i have a TextArea. when i try to set its size it does not work before the window is shown.
after the window is shown there is no problem with the setSize.
any idea why?
import java.awt.*;
import java.awt.event.*;
public class Components extends CloseableFrame
     TextArea textArea = null;
     public static void main(String[] args)
          Components f = new Components();
          f.setBounds(100, 100, 340, 300);
          f.setVisible(true);
     public Components()
          super("Components");
          setLayout(new java.awt.FlowLayout(
               java.awt.FlowLayout.CENTER, 20, 10));
          textArea = new TextArea("my text", 20, 40, TextArea.SCROLLBARS_VERTICAL_ONLY);
          textArea.setForeground(Color.red);
          add(textArea);
          textArea.setSize(10, 10); // <<=== NOW WORKING !!!!!!
          Button btn = new Button("button");
          add(btn);
          btn.addActionListener(
               new ActionListener() {
                    double sizeFactor = 0.5;
                    public void actionPerformed(ActionEvent e) {
                         Dimension size = textArea.getSize();
                         size.width = (int) (size.width * sizeFactor);
                         size.height = (int) (size.height * sizeFactor);
                         textArea.setSize(size); // <== WORKING !!!
                         if (sizeFactor == 0.5)
                              sizeFactor = 2;
                         else
                              sizeFactor = 0.5;
}

When you call setSize or pack the layout manager collects the preferred sizes of the components and lays them out. Until then it doesn't have the information available to give you.

Similar Messages

  • BW-SEM hardware sizing question

    Hi all, please help me with sizing process
    Now I'm doing sizing of the big BW-SEM system.
    I'm using quicksizer and document "Sizing ASAP FOR BW ACCELERATOR" (https://websmp102.sap-ag.de/~sapidb/011000358700001951182003)
    There is such phrase: "In a comparison of SAP BW benchmark results with SD benchmark results we have obtained a factor of 2.28" (page 11)
    what type of SAPS I obtain from quicksizer - SD or BW?
    So,  should I result from quicksizer tool multiple by 2,28?
    Are there any official documents for this question?
    Thanks in advance,
    Best regards, Elena

    Hi;
    Currently our current 11.5.10 Production is running on a Two node architecture on HP-Unix PA-RISC with the 128 GB of RAM on the Application Server and 256 GB RAM on the DB Node.
    For R12 the servers will be on HP-Unix Itanium and the sizing has been factored as 128 GB for the Application server and the DB will be on RAC with 128 GB of RAM each on the DB Nodes.
    I want to know is the sizing correct?
    When sizing a RAC Env is it ok to just split the current configuration into two and size the same on two nodes?
    Please share your experiences.We do not know how your machine has process which mean we do not know your activiy on your system. You can check some benchmark
    http://www.oracle.com/us/solutions/benchmark/apps-benchmark/ebs-standard-benchmark-overview-192676.html
    Its also important how mch cpu you have.
    Let me give you example from our system. We have 2 node apps server, 2 node rac and db size is almost 18T and our system is working nonstop. Our db has 30CPU and 120g RAm for each node. For apps cpu count and ram count are not like that.10 CPU and 20G ram.
    We are happy wiht apps side, but we still working on better performance issue for our db side
    Regard
    Helios

  • SD - situation/effort analysis, sizing questions.

    Hi,
    do not you know if there is some SAP methodology or template which will enable me to get an overview about size of the AS IS situation from sales and distribution point of view in an company?
    I am looking for ideally list of questions which will allow me to estimate effort that will be needed for sucesfull rollout.
    Example of questions coming to my mind....will existing business processes be only used or new have to deployed? How many sales areas (or e.g. shipping points) needs to be created? Etc.
    Please consider this should be an SAP rollout for more distribution center(s).
    Thank you!

    Get a copy of the SAP ASAP methodolgy and use that  or see if you can get a copy of a blue print that has the questions already included and work your way through it.

  • JTree sizing question...

    Hello:
    I have a JTree for which each cell contains a button. I have written a renderer that renders the button, and I realize that I have to do some special stuff to capture a click on the button. My question is unrelated to all of that.
    The problem is that over time, the labels on my buttons change (and may become longer (wider)), but the tree size does not change. In fact, when I update the button label and the tree is re-rendered the rendering of the button gets "chopped off". I've put the tree in a scroll pane, but this doesn't help - the right side of some of the buttons get cut off to the original tree size. I've tried lots of different variations on setPreferredSize, calling repaint, etc, and am not having any luck. I've put together a demonstration of this behavior in a smallish application that I'm posting here, where I create a 2 node tree with buttons that read "Hi", then I change the button labels to "Goodbye" and re-render. You'll see that the button's are cut off about halfway through the button.
    In case its important - I'm running java version 1.5.0_07 on a 32-bit Linux box.
    Any help would be greatly appreciated. Thanks in advance!
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.*;
    public class JTreeQuestion
      public static void main(String [] args)
        JTreeFrame f = new JTreeFrame();
        f.pack();
        f.setLocation(30, 30);
        //Draws buttons with "Hi" (short string)
        f.setVisible(true);
        ButtonNode.updateString("Goodbye");
        //Draws buttons with longer string, buttons get "cut off"
        f.repaint();
    class JTreeFrame extends JFrame
      JTree tree;
      JScrollPane treeView;
      public JTreeFrame()
        super("My Tree");
        DefaultMutableTreeNode root;
        root = new DefaultMutableTreeNode(new ButtonNode());
        root.add(new DefaultMutableTreeNode(new ButtonNode()));
        tree = new JTree(root);
        tree.setCellRenderer(new ButtonNodeRenderer());
        treeView = new JScrollPane(tree);
        add(treeView);
    class ButtonNode
      public static String str = "Hi";
      public static void updateString(String inStr)
      { str = inStr; }
      String getStr()
      { return str; }
    class ButtonNodeRenderer extends DefaultTreeCellRenderer
      public Component getTreeCellRendererComponent(JTree tree,
                              Object value, boolean sel, boolean expanded,
                              boolean leaf, int row, boolean hasFocus)
        Box theBox = new Box(BoxLayout.X_AXIS);
        super.getTreeCellRendererComponent(tree, value, sel, expanded,
                                           leaf, row, hasFocus);
        DefaultMutableTreeNode jtreeNode = (DefaultMutableTreeNode)value;
        theBox.add(new JButton(((ButtonNode)jtreeNode.getUserObject()).getStr()));
        return (theBox);
    }

    For those who are interested. The DefaultTreeModel has a method named nodeChanged() that tells the tree model that a specific node has changed, and the model re-interprets the cell causing its sizse to change as necessary, so that the full button is rendered now.
    Basically what I did was instead of calling repain, I call a method that I wrote that loops through all the tree nodes, indicates they have changed, then repaint's, and it all works out. My trees are relatively small, so this is fine, but if others face the same problem, you'll probably want to selectively indicate which nodes have changed so the tree model doesn't have to do more work than necessary.

  • Catalog database sizing questions

    Hi There,
    We need to create an RMAN catalog that would be able to support 8 databases 5 of which are around 50gb(40GB db files+10gb arcglogs) and the remaing 3 are about 120gb (100 db files and 20 archlogs).
    Does anyone have any sizing recommendations regarding memory structures (sga, pga, large pool)? disk space? We are using Oracle 11.1.0.7 on windows 2008 server. The server itself is an intel box, dual core E5440 - with 16gb RAM.
    Thanks

    Hi rsar001,
    The size of the catalog schema and database in your setup will not grow to more than 1GB (as long as you maintain a retention policy).
    Just set sga_target to 1G.
    As an example I have around 100 databases with sizes bewteen 10 GB and 2T and run a daily backup on all of them retention policy 1 month.
    The catalog is and stays around 700M for more than 2 years.
    Rgds,
    Tycho

  • Sizing Question

    I am using the quicksizer tool and had a question that I could not find the answer to in any quicksizer documentation.
    When you fill out the EP quicksizer active users table there are 4 scenario categories:
         NW-EP-ESS (Employee Self Service)
         NW-EP-INT (EP Intranet scenario)
         NW-EP-PCC (EP People Centric Scenario)
         NW-EP-PRT (EP Custom developement scenario)
    Do I fill out all 4 scenarios or just one. And if a user exists in both do I add them to both?
    Appreciate your assistance,
    Tom

    With the help of a collegue I was able to figure it out. These 4 categroies in the quicksizer are just for notation. It really doesn't matter where you put the data. The only thing you need to fill out is concurrent users, think time, java iviews per page, url iviews per page, % KMC and total users logins within an hour.
    Regards,
    Tom

  • Sizing question (beware newbie)

    Hi all,
    Here’s a question from a true newbie, I hope it is not
    to ignorant to answer though.
    It might be the case that this question has been addressed
    somewhere in this forum already but that I don’t recognize
    the problem due to terminology, to which I’m still to new.
    The other problem is that don’t have the site online so
    it’s not possible to show it live.
    I’ve tried to make an index page (html) with an image
    in the middle like a bar. On this bar a few buttons are placed.
    When I preview this page in a browser it looks right at first but
    when I use the ctrl button and scroll-wheel, (normally altering the
    text size) it completely changes the size of the size except for
    that bar image. The buttons appear somewhere else on the page. (not
    a pretty picture)
    Is there a way to prevent the use of ctrl combined with the
    mouse scroll-wheel?
    It was told me that using fonts measured as pixels this
    wouldn’t be possible but that didn’t prevent this to
    occur.
    Thanks for any help.
    Kind regards,
    Lexz.

    http://apptools.com/examples/pagelayout101.php
    Then move on to these -
    http://www.projectseven.com/tutorials/css/qdmacfly/index.htm
    http://www.macromedia.com/devnet/mx/dreamweaver/css.html
    http://www.macromedia.com/devnet/dreamweaver/articles/tableless_layout_dw8.html
    http://www.macromedia.com/devnet/dreamweaver/articles/css_concepts.html
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "lexdepax" <[email protected]> wrote in
    message
    news:fn53i6$fet$[email protected]..
    > Ok, that's a clear answer Bregent. Thanks for that.
    > Now as a complete newbie the queston that comes to mind
    is:
    >
    > Is that something one can do visually ( I mean in Dream
    Weaver) or is that
    > always managed from the code itself, which seems to me a
    difficult job.
    > It was so temting to be able to visally place my stuf
    anywhere I wanted
    > it.
    >
    > What would you suggest as the right approach for a
    starter?
    >
    > Thanks again.
    >
    > Regards,
    >
    > Lexz
    >

  • Enterprise DQ - hardware and sizing question

    Hi, we are considering implementing Oracle Enterprise Data Quality (all components) and would like to know the hardware (memory, number of CPU's, etc.) sizing parameters/requirements for this software.  Obviously, data volumes are a key factor.  I'm hoping someone in this community can indicate the "hardware" size they have implemented DQ on and if there are any concerns/issues that, if not considered, can have an adverse impact on the performance and operation of this software stack.
    Thank you.
    Brian.

    Hi Brian,
    See my response to your separate mail.
    Regards,
    Mike

  • CCM - Trex sizing question

    Dear all,
    I'm currenlty installing CCM and Trex on a development system. I was wondering whether someone of you had an indication on what the approximate required disk space is for Trex ?
    The Trex will only be used by CCM and CCM (in our dev system) will have minimal (approx. 100-200) catalog items.
    Thanks for your reply,
    Best regards,
    Kristof

    Hi
    <u>TREX is mandatory for CCM2.0. TREX is a required component of the SAP CCM 2.0, even in the scenario where the search functionality would not be used (i.e. in a scenario of just navigating the hierarchial structure and selecting items) the TREX is still a requirement for publishing and indexing of the published data.</u>
    <b>Other related links of Interest -></b>
    Re: Implement Trex and CCM
    Re: Catalog search (TREX)
    TREX functionnalities
    Re: Configuring trex in ccm 2.0
    Who are the users in SRM sizing?
    Re: sizing the hardware and environment for the upgrade
    Catalog performance issue
    Re: Catalog Mgmt
    Filtering Catalog Search Results
    Configuring trex in ccm 2.0
    Re: Catalog search (TREX)
    Re: Error in Accessing Catalog
    Re: SRM and CCM config
    Re: Are there dependences between the OCI-releases and SRM-releases?
    Re: RFC connections between Iseries (SRM) and Windows 2003 TREX
    Hope this will help.
    Regards
    - Atul

  • Tuxedo domain sizing question

    Background:
    This is a Peoplesoft app (PT 8.5, Tux 10gR3, Weblogic 11g)
    We are moving from 4 app server virtual machines which each hosted a tuxedo domain (4 vcpu each, actually getting slices from 8 physical cpu each) to one physical server with 12 cores (2 6 core procs). We only need this horsepower for 7 30 minute events per year (course registration). Otherwise a single domain is fine.
    We ran a test last event that showed a physical machine significantly outperformed the virtual when given similar resources, So we have decided to employ a large physical server.
    We intended to configure 3 Tuxedo Domains, mostl;y as it helps us compare to where we came from (Webserver VM will still host one domain) so we are effectively throwing 4 cpu at each domain. This comes from an understanding that we shouldn't have too many appsrv processes in one domain. We currently run a a pre-spun 25 appsrv procs each domain, and we get ok performance. From the looks of our physical server test, our performance will improve.
    During the peak of the registration event, we have around 500 sessions, we limited to 225 active http sessions on the webserver, which acts as the valve to the event. Note: all previous events were on PT8.48, OAS 10g.
    So , on to my question.
    Is there a way to make a single larger domain, with say 50 or more appsrv processes (mostly to avoid the config maint) or does anyone have any recommendations here?
    Any and all input appreciated.

    Hi,
    Take these comments with a large grain of salt as they are generalizations and not necessarily applicable to PeopleSoft. I'd really suggest asking this question in their forums as there may be PeopleSoft specific configuration constraints that I'm about to violate.
    In any case a Tuxedo domain can range from a single machine with a single 1 core processor, to many machines each with many cores. Once you move beyond a single machine, regardless of the number of cores, you are in a clustered environment, or what Tuxedo refers to an MP domain.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Database Sizing Question for 11i

    I am looking to see if there is a spreadsheet or tool that would tell me the optimal database size, for 11i.
    I understand there was one for 11 that would tell you the best size after you told it the number of suppliers you have, the number of inventory items available, number of accounts, etc...
    Thanks
    Sanjay

    Stefan,
    I guess both of us were writing at the same time and hence I missed your post edited part. Let me explain the user part. You can think about them in 3 different roles:
    Named users - Number of users in the system which may or may not have "Guest" users. Not much useful for hardware sizing.
    Logged On Users - Users currently logged on to the system not yet logged off and user logged on to the system but killed the browser. But they are still in the J2EE system holding memory with session info. They are useful for Memory sizing.
    "Active Users" - They are doing sometime with some "think-time". They could be "high/medium/low" users based on the "think-time". They contribute to both CPU and Memory sizing.
    Based on the above definitions (which may vary with different models) sizing will vary. Once you know your user profile (how many of them and how they use), you can use quicksizer to have some initial estimate. In case you have access to SAP fields and/or support, you can contact for some additional information. Those are useful for initial stage. If you have your system available, run some load tests to verify your initial estimate and refine them.
    Thanks,
    Swapan

  • Upgrade sizing question

    Hello,
    I am trying to estimate the database's monthly growth after upgrade from ERP 4.6 to ECC 6.0.
    For example, currently, I see that the Database grows by 1 Gb per month.
    Can I assume this is the same growth level per month after the upgrade?
    I've read the notes on the full increase in database size, and I am ok with that.  But that doesn't answer my question.  I don't think I use the same percentages from the notes.
    Also, I don't see the monthly growth listed in the quicksizer.
    Does anyone have any thoughts on this?
    Thanks
    Doug

    Hello Doug,
    The increase of the database in a month is very difficult question. Because, this depends on the number of users, components that you use in ECC 6.0  and the type of business you run.
    The initial database size for ECC 6.0 will be obvisouly more almost double when you compare to ERP 4.6. So, you can expect the same amount of growth with a little additional in ECC 6.0.
    Hope it helps.
    Cheers,
    Satish.

  • Quick Sizing question

    Hi there,
    I (my client) have a cube with 1.8 Billion records with 850K distinct values. As you may know quick sizing allows you to enter only up to 999,999,999 records per line. What is the most accurate way to size this cube? If I enter 1B and 800M as two liners, I don't think that would be same, or shuold I use RSRV instead of quick sizer or anything else?
    I appreciate your help, don't spend too much time since it's just an estimate, but I am curious if the difference will be signifcant, becuase I have 4 more over 1B cubes
    Cheers
    Tansu

    you can use DB02 as described in the below how-to
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0427b8a-7fe5-2c10-f1be-a8be71fa2c06?quicklink=index&overridelayout=true

  • ECC6 Sizing Question!

    HI All
    I need some advice and possible a recommendation on SAP Sizing.
    We currently run an ECC6 (Netweaver 2004s) Platform in a 32Bit Environment and we are looking to upgrade to 64-Bit technology (as recommended by SAP). However I want to look at resizing our landscape completely, so has anyone used and companies who specialise in this?
    We are based in the UK.
    Many Thanks
    Phil

    Dear Phil,
    These are some ofthe good links for Hardware Sizing.
    SAP Market place:
    https://websmp102.sap-ag.de/sizing
    SDN:
    Right-Sizing Your Hardware [original link is broken]
    These are 2 good links:
    http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/PRS1672
    http://aroundsap.blogspot.com/2007/09/sap-hardware-sizing-and-benchmarking.html
    This link has got a good document which is really helpful.
    www.dell.com/downloads/global/solutions/sap_sizing_wp.doc
    There is one book from SAP Press which if you can get will give you good idea on Sizing:
    www.sap-press.com/product.cfm?account=&product=H2904
    Please click on the folowing link. Use your S-key.
    Click on this link:
    https://websmp102.sap-ag.de/sizing
    Use Quick Sizer: The Quick Sizer is a tool jointly developed by SAP and its hardware partners to help customers get an idea about initial sizing. It is free of cost.
    Click on the Customer name . Make a Project Name.
    Press on calculate result. This will calculate sizing for you. There are certain details which are required as input such as:
    Which systems do you require?
      Productive Sys. 
      Consolidation system  
      Development System 
    Database & Operating System
    Database  DB2 UDBDB2-OS/390DB2-i5/OSDB2-AS/400InformixMAXDBOracleMS SQL Server 
    Details of DB (e.g. version, parallel)   
    Current size of DB (in GB)   
    Operating System  AIXAS/400HP-UXLINUXOS/390SOLARISTrue64-UNIXWINDOWS 
    Details of OS (e.g. version) 
    Solution   
    SAP Customer Relationship Mgmt      
    SAP Enterprise Resource Planning      
    SAP ERP Financials      
    SAP ERP Human Capital Mgmt      
    SAP Product Lifecycle Mgmt      
    SAP Supplier Relationship Mgmt      
    SAP Supply Chain Mgmt      
    SAP NetWeaver 
    Please let me know if any clarifications are required.
    Regards,
    Rakesh

  • Web gallery re-sizing question

    Hi all,
    I am a wedding photographer and do all my editing and web galleries with LR. I burn a data DVD for clients with high-res JPG files, and I use LR to generate a web gallery that includes all their photos for them to more easily browse through the files on the data DVD.
    I do this by making an HTML web gallery in LR, then replacing the directory of "large" image files (that are only 600px width or height) with high-res images (that are up to 3500px wide or high). This way clients can browse within a nice web gallery structure but still have the high-res files on the data DVD.
    This method was working fine on LR 1.2 but since the 1.3 upgrade the generated CSS for the HTML gallery seems to have changed and it's messing with my technique of replacing the LR generated "large" files with my high-res files!
    Looking at the CSS code, instead of specifying a width and height it now specifies a "maxSize". I havent come across this CSS code before, and it doesnt seem to be recognised by my Firefox or Mac Explorer browsers.
    So what happens when I replace the 600px files with my high-res 3500px files is that the HTML page for the full preview photo shows a massively wide or high photo, ie it runs right off the screen. Previously it maintanied a max 600px width or height.
    So does anyone know how to fiddle with the CSS to allow me to refer to the high-res images but allow clients to browse files as 600px?
    Thanks

    >Mac Explorer browsers
    I don't know about the other problem, but I hope you are not honestly still using IE for mac. Microsoft retired this browser many years ago and it is not up to any current CSS standard. On Macs use Safari or Firefox. Preferably the first as it at least color corrects and considering most macs' screens are calibrated at the wrong gamma, Firefox will make all your images appear to have less contrast than inside Lightroom. Firefox will have icc profile support in version 3.0 which is currently in beta but that will take a while before it gets released in usable form.

Maybe you are looking for

  • Linking text boxes in Pages

    I can no longer link text boxes in Mavericks. I have version 10.9.3 installed. It seems like this is a problem that should have/would have been addressed long ago. When I go to Format in Pages, the Add Link is in light grey and it will not let me add

  • T30 Important questions regarding parts

    I have a 2.2G T30 system. If I open up the one panel on the bottom of the unit I see there is 2 port and each port has something plugged into it. In the one port is a Wireless card, in the other port is a card which has part number 26P8477 on it. Whe

  • Is There A Command To Find & Extract ".zip" Files

    Is There A Terminal Command I Can Use To Find and "Extract"...All zip Files From one External HD and To Unzip Them To Another External Drive I Would Like For Terminal To Find all the zip files on my old external Hard Drive inside of my karaoke folder

  • Why or When should we use Execute Immediate in PLSQL??

    Hi Frnds, Long Ago i have received a interview question that ... How can U create a table in the PLSQL object(Function or procedure)? But the thing y should we use execute immediate? In which scenario we should we should use???????????? Why or When s

  • Acrobat installer encountered an unexpected failure / Close safari and continue, but its already closed

    I'm trying to install acrobat pro, I'm even trying different computers, on one computer it askes me to close safari which I've already done but it asks anyway.  on the other two computers i get "error encountered" acrobat installer encountered an une