Light weight && heavy weight

hi
i have on doubt in swing... awt are heavy weight && swing are light weight .awt are system dependedent ....iam right..
if right System dependent in this sence java is plaftform independent
so how is it possible..
pls give me details
regards
kedar

Light weight components: To draw the components the jvm takes the os routine.
Heavy weight components: To draw the components the JVM takes its own routines.
You can check this. If you draw the awt component in one os it gives the different layout in other os. But this is not in the case of swing.This is the main difference . That's why the main components in big project are done in swing.
if in doubt please ask?
javasans

Similar Messages

  • Why the AWT components are called heavy-weight and SWING as light-weight?

    Why the AWT components are called heavy-weight and SWING as light-weight?.
    Building our own components means overhead on JVM. hence in what sence the SWING components are called light weight.?
    I know that the Swing componets are the components which are not going to depend upon peer classes and render, OS independent LOOK n FEEL.
    Thanks,
    Sanath Kumar

    All extensions of Component are considered lightweight since, as you point out, they don't have their own dedicated native peer.
    Essentially a lightweight component only has a canvas on which to draw itself and some means of receiving events from the system. In fact, there is no need to have one of these "canvas" and "event" objects for each component - the parent component can manage these abilities on behalf of its children. Eventually you end up with only top-level components needing to be heavyweight in order to communicate with the windowing system.
    A lightweight component therefore has the minimal dependency on the underlying windowing system giving you maximum cross-platform flexibility.
    It is usually true that lightweight => slower and heavyweight => faster since it is reasonable to assume that native peers will be optimal for the windowing system. However, that's not the point of the lightweight/heavyweight distinction.
    Hope this helps.

  • Forcing PopupFactory to return a heavy weight popup

    Hi, in my application I want to display a Popup over the top of a Canvas that is within a JPanel. The way I am trying to achieve this is:
    PopupFactory popupFactory = PopupFactory.getSharedInstance();
             Popup tipWindow = popupFactory.getPopup(tipComp, tip, theLocation.x, theLocation.y);
             tipWindow.show();The variable tipComp is a heavy weight Canvas, and the variable tip is a subclass of JToolTip we are using to provide extra functionality.
    Using this code the Canvas is obscuring the Popup, as the Popup returned is light weight. Is there any way to force PopupFactory to return a heavy weight popup?

    I did consider this but unfortunately it is not possible. The software has been developed over a long period of time and is very large. It would not be possible to have anything other than a Canvas (we actually have extended Canvas to provide extra functionality). Is there any other way to solve this problem?
    Thanks

  • Qt heavy weight component

    Hi guys,
    Im using the QT java api and have hit some problems with their AWT video window component. The reason I'm posting here rather than the QT forums is that I believe this problem is common to all heavy weight components in Java.
    Ok, the QT api offers a factory method for creating what they call QTComponent (awt heavy weight component - extends java.awt.component) which I add to a dedicated JPanel.
    I need to be able to set the visibility of the video window so I do;
    parent_panel.setVisible(value)
    parent_panel.repaint();
    parent_panel.invalidate();
    parent_panel.validate();
    which sets the parent JPanel visibility to hidden but does not hide the child video window. (note: this is called from the event dispatch thread).
    I have tried validate, invalidate, repaint (you name it), on both the parent JPanel and the java.awt.component itself, but this still doesn't fix the problem.
    One thing to note is that if I resize or minimize then maximize the container JFrame the video window disappears. So i'm guessing the handlers for these events execute routines I need to in my 'setvisible' method.
    If anyone could help that would be great.
    Many thanks,
    Alex

    Athlon1600 wrote:
    that heavy-weight component is JDIC web browser. It's the only cross-platform browser I know and it's one of the main controls in my GUI. can't change thatCan't help you there.
    JInternalFrame descends from JComponent? yes?Yep. So it's lightweight.
    Well, I'm not smart enough yet to mix lightweight and heavyweight components, but fortunately Google is: [Mixing Heavy and Light Components|http://java.sun.com/products/jfc/tsc/articles/mixing/]
    ~{color:gray}the first hit by the way{color}~

  • Quicktime heavy weight components

    Hi guys,
    Im using the QT java api and have hit some problems with their AWT video window component. The reason I'm posting here rather than the QT forums is that I believe this problem is common to all heavy weight components in Java.
    Ok, the QT api offers a factory method for creating what they call QTComponent (awt heavy weight component - extends java.awt.component) which I add to a dedicated JPanel.
    I need to be able to set the visibility of the video window so I do;
    parent_panel.setVisible(value)
    parent_panel.repaint();
    parent_panel.invalidate();
    parent_panel.validate();
    which sets the parent JPanel visibility to hidden but does not hide the child video window. (note: this is called from the event dispatch thread).
    I have tried validate, invalidate, repaint (you name it), on both the parent JPanel and the java.awt.component itself, but this still doesn't fix the problem.
    One thing to note is that if I resize or minimize then maximize the container JFrame the video window disappears. So i'm guessing the handlers for these events execute routines I need to in my 'setvisible' method.
    If anyone could help that would be great.
    Many thanks,
    Alex

    Lightweight components are components whose printed
    sources weigh less than 200 grams.Is a paper and a print face required?

  • Laptop monitor crashed due to heavy weight on it

    Sir,
    I have hp pavilion n15-004TX, bought 6 months ago. I have 1+2 years extended factory warranty.And my laptop screen has crashed due to fall of heavy weight on it. I was wondering if this comes under factory warranty or not? 
    Waiting for your valuable response.

    This Forum is not a link to HP Warranty. We are volunteer end users like you. I think the Care Pack may or may not include Accidental Damage coverage. It is very expensive and you have to buy it as an add-on. Your best bet is to call HP. If it is not covered we can help you find a screen and show you how to replace it. How much was damaged? Do you just need the screen or also some platic chassis parts? Screens cost less than you probably think (under $100 in most cases) and the replacement is not real hard. 

  • What is lightweight process and heavy weight process

    please can any one send the difference between lightweight process and heavy weight process .... and why thread are called lightwieght process

    shankrocks wrote:
    please can any one send the difference between lightweight process and heavy weight process .... and why thread are called lightwieght processProcess and thread are often used interchangeably (even though process also is used in a wider meaning). In Java a lightweight thread is also called a green thread.
    [http://en.wikipedia.org/wiki/Green_threads]
    So when programming in Java you're going to be using lightweight threads (unless you somehow bypass the JVM and start OS threads directly).
    More generally heavyweight usually refers to something that supplied by the OS. You have the same is Swing/AWT where Swing widgets are called lightweight because they're drawn by Java while AWT widgets are called heayweight because they're drawn by the OS.

  • Gross Weight, Net weight in Basic views

    Hi,
    I have encounter this issue where we have set Gross Weight, Net weight as mandatory in material master Basic view. It works fine when we create only the basic view, but when we create Basic view + Purchasing view, the Gross weight and net weight field become optional, anyone encounter the same before?
    best rgds,

    Hi Eric,
    I think, u2018filed selectionu2019 setting is made at plant level.
    Goto IMG, Logistic General, Material Master, Filed Selection, Define Plant specific filed selection and plant specific screen selection
    Select your plant and see the 'Filed reference' for your plant.......... (A)
    Now goto IMG, Logistic General, Material Master, Filed Selection, Maintain Field selection for data screens.
    In this select your 'Field Selection Group' ... might be 22 and
    And select Filed ref for your plant.... (A).
    See whether filed selection for your plant is u2018Reqd Entryu2019 OR u2018Optional Entryu2019.
    Rewards are helpful.

  • Same gross weight & net weight in delivery

    Hi Gurus,
    Why net weight and total weight is coming same in delivery?
    In Delivery > Goto > Header > Loading > Total weight & Net weight
    as I see difference in  the gross weight & net weight in MMR.
    What could be the reason?
    Regards,
    Rakesh

    Hi,
    Chcek in VOV7, whether the field "Wght/Vol. Relevant" is flagged or not. It has to be flagged to calculate weight and volume for an item.
    Regards
    Vijay

  • On-dispatch-event trigger related to mscomm (load weight from weight scale

    aoa!
    please guide me to pick weight from weight scale.
    i m using mscomm32 ocx for this purpose.
    clarify the role of on-dispatch-event trigger and specify all events
    regarding mscomm and also explain how to trap events for accomplish
    task.
    thanks in advance.
    Tool used:developer 6i & oracle 10g windows xp(sp2)professional.

    Thanks, but I've already seen this thread and done the steps described on it.
    Actually, my question is very specific... How to populate the fields LinkVal and LinkUnit of the registry...
    I read all the threads here in SDN and they don't answer my question...
    I'd be glad if someone had already done tcode HUPAST works for Filizola...
    Tks again.

  • Problems with embedded font with medium or heavy weight

    Hey guys,
    I'm switching a current Project from Flashbuilder Beta2 to the Flashbuilder final release.
    I have a big problem concerning embedded fonts. The fonts I have to use are Futura Com Medium & Futura Com Heavy.
    Here's some of my code:
    @font-face
         src:                        url("assets/fonts/FuturaCom-Medium.ttf");
         font-weight:               normal;
         fontFamily:                 myFuturaMedium;
         advancedAntiAliasing:       true;
         embedAsCff:                 false;
    .myDatagrid{
         fontFamily: myFuturaMedium;
         color: #ff0000;   
    this worked well in beta2, but I'm not able to get the embedded Font working in the datagrid with the Flashbuilder final release.
    Any help on using embedded fonts in a mx|Datagrid is highly aprechiated.
    Cheers

    Hey guys,
    I'm switching a current Project from Flashbuilder Beta2 to the Flashbuilder final release.
    I have a big problem concerning embedded fonts. The fonts I have to use are Futura Com Medium & Futura Com Heavy.
    Here's some of my code:
    @font-face
         src:                        url("assets/fonts/FuturaCom-Medium.ttf");
         font-weight:               normal;
         fontFamily:                 myFuturaMedium;
         advancedAntiAliasing:       true;
         embedAsCff:                 false;
    .myDatagrid{
         fontFamily: myFuturaMedium;
         color: #ff0000;   
    this worked well in beta2, but I'm not able to get the embedded Font working in the datagrid with the Flashbuilder final release.
    Any help on using embedded fonts in a mx|Datagrid is highly aprechiated.
    Cheers

  • Fixing heavy weight Canvas problem

    I am new at posting in the forums so let me apologize ahead of time if I am not clear enough. I first (incorrectly) posted this topic in the "Java Programming" forum and was led to this forum instead.
    I am using NIH's open source "Image Processing and Analysis" libraries, ImageJ, in a program that I am creating. Basically I have a JFrame that is divided into 4 sections via nested JSplitPanes. Each of the 4 sections (top right, top left, bottom right, bottom left) contain a JScrollPane to which I have added a JPanel. I would like to display an image of type ImagePlus (an ImageJ class that extends java.lang.Object) in 3 of these sections.
    Each ImagePlus is currently contained in a subclass of an ImageCanvas (another ImageJ class) which extends java.awt.Canvas. This ImageCanvas is then added to the corresponding JPanel. When the JScrollPanes are resized so that they are smaller than the ImagePlus, the image extends outside (and appears over top) the JScrollPane.
    In another forum posting I was reading, it was said that instead of extending Canvas you should extend JPanel so that you do not mix AWT and Swing components, which I understand. However, would it be possible to add an ImagePlus to a JPanel since the ImagePlus does not extend java.awt.Component?
    If not, could anyone suggest some other way of displaying my ImagePlus in a light weight component?
    Thanks for any assistance!

    You where given a suggestion in your other posting two days ago.
    You where given the exact same suggestion as was given here. In fact you where also given the same to link to the article on mixing components.
    Where in the other posting did you comment that the suggestion given did or didn't work??? If you ask a question the least you can do is comment on whether the suggestion was helpfull or not.
    So quit multi-posting question and keep the conversation in on posting so everybodyy knows what has already been suggested and so people don't waste their time making the same suggestions.

  • Robohelp 9 search: heavier weight with multiple keywords?

    We are working with the new search engine (moved from 7 to 9) and are having some issues with the way that our users are used to searching.  One thing was came up was the question of whether a single keyword added multiple times to a topic would bring it a higher weight in the Robohelp 9 search ranking.  Does anyone know if it will disregard multiple instances of the same word in the Keywords in the Topic Properties or if we can use that to stack the deck?

    Hi there
    One way to "stack the deck" so to speak is to ensure the keyword is used in the Topic Title. Aside from that, ensure it is also used in the Keywords field of the topic as well as in heading levels. For example, a keyword in a Heading 3 will be trumped by the same keyword in a Heading 1. And that is trumped by the keyword in the Topic Title.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How can i improve a heavy weight query

    i previously posted a question about a query someone else has written and i am now looking to rewrite to improve its timing.
    this is the old query :
    SELECT 0, 0, 0, 0, SUM(CAST(allowedHours AS number(20,0))) FROM tablex WHERE (forecastCode = 83 AND filesetId in (SELECT VAL FROM tabley WHERE QUERYID = '38ab814a7c465cf8_3afa60db_1134ddf8f6e_-7ff9' AND DATATYPE = 1) AND taskCode in (SELECT VAL FROM tabley WHERE QUERYID = '38ab814a7c465cf8_3afa60db_1134ddf8f6e_-7ff9' AND DATATYPE = 2) AND roleId in (SELECT VAL FROM tabley WHERE QUERYID = '38ab814a7c465cf8_3afa60db_1134ddf8f6e_-7ff9' AND DATATYPE = 3) AND ((weekstart BETWEEN 39171 AND 39534)))
    which i have rewritten so far as :
    SELECT 0, 0, 0, 0, SUM(CAST(TB1.ALLOWEDHOURS AS number(20,0))) "BEST RESULT" FROM TABLEOWNER.TABLEX TB1 WHERE TB1.FORECASTCODE = 83 AND EXISTS (SELECT TBQ.VAL FROM TABLEOWNER.TABLEY TBQ WHERE TBQ.QUERYID = 'v4eaeac2_-17d28fb6_1134e59b62b_-3xx9' AND TBQ.DATATYPE = 2 AND TBQ.VAL= TB1.TASKCODE) AND EXISTS ( SELECT TBQX.VAL FROM TABLEOWNER.TABLEY TBQX WHERE TBQX.QUERYID = 'v4eaeac2_-17d28fb6_1134e59b62b_-3xx9' AND TBQX.DATATYPE = 1 AND TBQX.VAL = TB1.FILESETID ) AND EXISTS (SELECT TBQY.VAL FROM TABLEOWNER.TABLEY TBQY WHERE TBQY.QUERYID = 'v4eaeac2_-17d28fb6_1134e59b62b_-3xx9' AND TBQY.DATATYPE = 3 AND TBQY.VAL = TB1.ROLEID) AND (TB1.WEEKSTART BETWEEN '39171' AND '39534') ;
    this has given me a 70% reduction in the elapsed time of the query.
    for the record :
    TABLEX has 31,536,939 records, of which 15,001,043 are affected by the query.
    and
    TABLEY has 7,539 records.
    in addition i created an index for the large table.
    CREATE INDEX "TABLEOWNER"."TABLEX_IDX" ON "TABLEOWNER"."TABLEX" (FORECASTCODE, TASKCODE, FILESETID, ROLEID, WEEKSTART, ALLOWEDHOURS) TABLESPACE "BIGTABLES" PCTFREE 0 INITRANS 2 MAXTRANS 255 STORAGE ( INITIAL 2048M NEXT 1024M BUFFER_POOL DEFAULT) LOGGING
    the net result in the explain plan is :
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=13879 Card=1 Bytes=162)
    1 0 SORT (AGGREGATE)
    2 1 HASH JOIN (RIGHT SEMI) (Cost=13879 Card=348592 Bytes=56471904)
    3 2 TABLE ACCESS (FULL) OF 'TABLEY' (TABLE) (Cost=21 Card=503 Bytes=23641)
    4 2 HASH JOIN (RIGHT SEMI) (Cost=13851 Card=352423 Bytes=40528645)
    5 4 TABLE ACCESS (FULL) OF 'TABLEY' (TABLE) (Cost=21 Card=503 Bytes=23641)
    6 4 HASH JOIN (Cost=13807 Card=1276364 Bytes=86792752)
    7 6 SORT (UNIQUE) (Cost=21 Card=503 Bytes=23641)
    8 7 TABLE ACCESS (FULL) OF 'TABLEY' (TABLE) (Cost=21 Card=503 Bytes=23641)
    9 6 INDEX (FAST FULL SCAN) OF 'TABLEX' (INDEX) (Cost=13523 Card=15182009 Bytes=318822189)
    Statistics
    64 recursive calls
    0 db block gets
    58781 consistent gets
    1713 physical reads
    0 redo size
    643 bytes sent via SQL*Net to client
    504 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    1 rows processed
    MY QUESTION. is there anything else i can do to optimize this query. before you say, add an index for TABLEY, don't because this was not as fast as the full table scan, using an index only gave 22% improvement.
    finally, i also analyzed the tables before hand.
    many thanks in advance

    Please post the explain plan and tkprof as described [url http://forums.oracle.com/forums/thread.jspa?threadID=501834&tstart=0]here. Also please make sure you use the tags [pre] and [/pre]!.
    Regards,
    Rob.

  • Change Stoke Weight PER Anchor Point

    I was wondering if in a future release of Illustrator if it would be possible to be able to have the option to change the weight (or thickness) on an anchor point by anchor point basis. Picture a straight segment (line) made up of two anchor points (drawn with the pen tool).
    I would like the ability to click on the first anchor point and change the weight (stroke / thickness) of that anchor point to 1 pt then click on the second anchor point and change it's stoke to 5 pts. I would like the line segment to be 1 pt thin at the beginning and for it to gradually get thicker until it reaches a 5 pt thickness at the second anchor point.
    In addition to that I would like to be able to do this with all of the Illustrator drawing tools, for example: Using the square tool, to be able to start the whole square at 1 pt stoke thickness... but then be able to select one of it's corner anchor points and change that one point to 3 pt thickness and have the attached segments get progressively thinner going down to the other 1 pt anchor points.
    I hope I've explained that well enough. If you need examples please let me know.
    Cindy Colby
    [email protected]

    Cindy,
    That request comes up here all the time. It really isn't workable. You'll soon find that you don't want the thickness settings to be locked to the positions of anchorpoints, because you're not going to want the
    thicknesses to be locked to the
    shape of the spine path.
    So on-object variable thickness control would end up requiring yet another set of handles along the path, just for controlling thickness. I serously question the real-world value of this.
    Look, you want to be able to vary the thickness of a stroke. You can already do that with an Art Brush. Example:
    1. Rectangle Tool. Draw a square.
    2. Rotate Tool. Rotate it 45 degrees.
    3. Remove Anchorpoint Tool. Click the left anchorpoint to remove it.
    4. Drag the resulting triangle to the Brushes Palette. Define an Artbrush.
    Now draw a path of any shape. Apply the Brush. You now have a "stroke" that increases thickness along the path.
    But you want it lighter or heavier weight overall. Adjust the stroke weight in the Stroke dialog.
    You want it going in the opposite direction. Change the direction of the path, change the direction of the Brush, change the direction of the Brush as it is applied to just that path (doubleClick its listing in the Appearance Palette), or make a pair of Brushes from the beginning (as I often do).
    But you said you want the start of the path to be 1 pt, not zero, and then to be 5 pt. at the end. Fine. Instead of a triangle, create your ArtBrush from a trapezoid instead of a triangle.
    Now... apply that trapezoid Brush to an ess curve. Works fine. Starts at 1 pt.; increases weigth to 5 pt. at the other end. But now you decide you want it to start at 5 pt., shrink to 1 pt. at the middle of the ess, then increase to 5 pt. toward the end.
    Now, you could easily build a Brush that does that, too, but consider this:
    So you use one of the methods explained above to make a "reverse" of the trapezoid Brush. You cut the ess path at the middle, where you want the thin to occur, and reverse the direction of one half.
    Now you encounter one of the key problems with all these half-baked suggestions for on-object stroke weight adjustment handles: The place where the "thin" changes directions has a kink in it. Do you want that kink? Sometimes yes, sometimes no. How will you control the "smoothness" of the change of direction of the stroke weight curve? Your tidy interface is going to have to get more complicated. It's going to have to include some kind of "direction handles" at each of the weight-change key points.
    Now I ask you: What feature in AI already gives you that control? Answer: ArtBrushes.
    Now consider the real-world practicality of all this. What do you want to use this for? Drawing calligraphy-like flourishes? You try that with any more than one or two intermediate thickness keys along a given curve, and you'll find the smoothness of the result is quite difficult to control. An ArtBrush thoughtfully-built from a simple geometric primitive is easier to control.
    Or do you want to use it to give your cartoon line drawings more of a hand-drawn look that is more convincing than the almost always unsatisfying results of Calligraphic Brushes? Do you really want to adjust handles on each and every path you draw in a cartoon? Try some of my simple geometric ArtBrushes and see if you
    really need more than two or three variants to get the look that you want.
    The idea sounds great on the surface, but if you give careful thought to the actual implementation, you'll find it isn't as workable as you first think. And for the vast majority of
    practical uses, simple ArtBrushes already facilitate it.
    Some here have even mocked-up elaborate fake "interfaces" for a separate window in which to tediously describe a "profile" of a varying stroke that would then later be added to paths; all the while failing to realize that is essentially what ArtBrushes
    already are--except you don't need a separate dialog to do it; you can do it right there on the artboard, and then update the ArtBrush.
    I fully expect that if Adobe spent development time in pursuit of a separate dedicated interface and feature set for this, the end result would be as awkward to actually use as the on-path handles for pathType objects, and as tedious and time-wasteful as all the tweaks and twiddles in LiveTrace.
    All that's really needed is a few thoughtful improvements to the already-existing Brushes feature set. How about an "isolation mode" (or edit window) for Brushes, instead of having to drag an existing Brush onto the artboard, edit it, and then drag it back to update it? Then do some work on improving the mitering of Brushes where they encounter corners and sharp bends in the spine path.
    The usefulness of other Brushes (particularly Pattern Brushes) would benefit hugely from just a few similarly modest improvements, too.
    JET

Maybe you are looking for

  • My touch screen on my iPhone 4S not working after upgrading to ios 7?

    I upgraded to iOS 7 and all the sudden when I go to type in my code to unlock my phone it is really laggy, when I finally get into my phone and go to use the keyboard to type a message it acts like I haven't even touched the screen when I go to type.

  • Issue with flex lifecycle

    I am trying to address an issue with flex lifecycle There is a ui component ( say CompA) comprising of multiple tabs with individual components used in each of them. CompA uses a data object that is used to populate the fields. On click of a button i

  • Airplay issue: Sound but no video

    Trying to use Airplay to watch Showtime Anytime. Able to get sound but no video.

  • Fluctuating battery capacity. can you give any tips to maintain my 596 cycles? (1 year old MBP 2012 13")

    battery capacity went from from 80.4% to 78% to 86%  within the same day. is this normal? i alraeady have 596 cycles 1year old mac with applecare before i'am always draining my battery, now that i knew that it is bad, what should i do now? any tips a

  • TextEdit's Unicode broken?

    I know it sounds ridiculous, but a year ago, when I saved TextEdit documents as Unicode (UTF-8) text files (.txt), everything worked fine. And when using non-Roman fonts everything looked great. Plus, I could drop those text files in my iPod's Notes