Difference between AWT,Swing and swt

Hello,
I am giving a seminar about swing in which I need to point out differences between AWT,Swing and SWT(Software Widget Tool).
I have two questions:
1)I read that-A heavyweight component is one that is associated with its own native screen resource (commonly known as a peer). A lightweight component is one that "borrows" the screen resource of an ancestor-which makes it lighter.Can anybody explain What native screen resource is and how it is borrowed?
2)I read that SWT uses native widgets and how can it be better than swing?If it is in what way?

Use Swing for new projects. AWT is the rendering layer underneath Swing in many cases, and AWT provides utility things like Graphics. SWT is an alternative to Swing which used more native rendering, but actually with Java 6, Swing is using a lot of native rendering.
Fire up NetBeans and use Matisse. Build an application. Run it under Windows, and then under Linux, and then realize how great it is.

Similar Messages

  • Difference between awt ang Swing Interview Question n other Question

    hi every one i use to think that i know java atlest so much that i can crack a lolcal comp interview but ........................
    i ansered few Question but was speachlees when was asked few of this i do not remember all of them
    1] difference between awt and swing.
    2]System.out.println();
    System is a class out is a variable so who come a variable calling a method.
    3]are constractor inherateed in java.

    1] difference between awt and swing.AWT is based on an abstraction of platform-specific, heavy-weight components. Swing is written entirely in java.
    >
    2]System.out.println();
    System is a class out is a variable so who come a
    variable calling a method.Do you mean how come?
    In that case, the answer is simple: Because out is a variable, it can be redirected/compared against, etc much easier
    3]are constractor inherateed in java.Kind of a trick question, as the answer is yes and no. Constructors are not inherited, but every constructor in the subclass must call one and exactly one constructor of the superclass

  • Difference between english (uk) and english british keyboards

    When I typed a message I found my iPhone was set to English (US) when I typed a message, in 'International' I added a 'British' keyboard and now I see I have English so I for some reason have English (UK) and English 'with British in grey underneath' in the keyboard list. Now I see when I go between dictionaries while typing that there are the options of English (UK) and English (US)...  can someone explain:
    1) Why English (US) shows when typing messages and yet it is no longer in the keyboards list?
    2) What is the difference between 'English (UK)' and 'English British'?
    Cheers

    APPLET An Applet represents a bytecode that embedded in a Web Page.
    Applets are executed on the Client Machine automatically the results are displayed at Client Side.
    SERVLET A servlet is a Java Object that provides the implementation of javax.servlet Servlet interface.A servlet is a Server side java program which processes client requests and generates dynamic web content.
    An Applet is a client side java program that runs within a Web browser on the client machine whereas a servlet is a server side component which runs on the web server. An applet can use the user interface classes like AWT or Swing while the servlet does not have a user interface. Servlet waits for client's HTTP requests from a browser and generates a response that is displayed in the browser
    The following are the major differences between an Applet and an Application:
    a. Applets execute within a java enabled browser but an application is a standalone Java program outside of a browser. Both require a JVM (Java Virtual Machine).
    b. Application requires main() method to trigger execution but applets doesn't need a main() method. Applets use the init(),start(),stop() and destroy() methods for their life cycle.
    c. Applets typically use a fairly restrictive security policy. In a standalone application, however, the security policy is usually more relaxed
    PLEASE GIVE ME A REPLY

  • Differences between System.gc() and Runtime.gc() ?

    differences between System.gc() and Runtime.gc() ?

    None!
    P.S. I have only found one reason to use System.gc(). For some obscure reason it seems that if one invokes System.gc() when a Swing application is about to be iconized it substantially reduces the delay experienced when de-iconizing the application!
    Several reasons for this have been suggested but I have found none that really explain why it works but it does work!
    Edited by: sabre150 on Sep 28, 2007 10:23 AM

  • Using swing and swt together

    i would like to use some of the components of swt such labels or buttons in swing as swt has better look and feel. but in all the examples i found they are using a whole set of swt api to create frames and showing them up.
    Isnt there any way to add button or label of SWT in Swing. i found a method SWT_AWT.newFrame(). But it is returning a awt frame not a Swing JFrame that at the frame level. i need them at individual component level(buttons and labels).
    hope u understood my problem.. any other suggestions??

    Swing and SWT are two different framework. Usually, peoiple choose one and stick with it. I would not mess with mixing SWT with Swing or vice-versa. I really don't understand why you would choose to mix these two framework together. "better look and feel" is not the best answer for this. what i would look into is a look and feel for Java (like JGoodies look n feel)..and check for Swing component that pther people have made (or enhance upon the Swing library).
    Stick with one framework. Your life will be much easier.
    Futhermore, maintainance would be less difficult. (you only have to know one framework instead of two, plus how they interact)

  • Difference between Abstarct Class and Interface

    HI,
    Here is a simple one for the gurus but quite important for me.
    What is the difference b/w an Interface and an abstract class?
    Why do we need each one of them?
    I would appreciate if you people can give examples of each so that I amy understand fully
    Thanks in advance...

    A normal class (not abstract) has a special behaviour, like java.awt.Frame. A Frame is a frame no matter how you subclass it. If you create a subclass it will still be able to be displayed by calling it's show method. So by using a normal class you can create a type of class.
    An abstract class does the same, but it leaves some of the code unwritten. For instance java.lang.Number. This class is abstract becuase it has no knowledge of how to store the number in memory. But it knows that it is a number, and any subclass will still be a number. You could create a subclass of Number that can hold the time in milliseconds and checks your system clock to see what the time is, it could also have methods that return the time in another country, but it would still be just a Number.
    An interface is a way to describe what an object can do, not what it is. So with java.lang.Comparable as an example you can make any class comparable. This means that no matter what type of object you have, it can be compared with other objects. So you can have a subclass of Frame that can be compared with other windows. Or a subclass of Number that can be compared with other Numbers. You can even compare those two different types if you like. So you could compare a window with a number.
    That is the difference between abstract classes and interfaces.
    I hope you could follow my arguments, it isn't an easy subject,
    Daniel

  • What is the difference between Mobile Engine and MI?

    hi all,
    i want to know the difference between Mobile Engine and MI and also what are the main advantages included in MI instead of ME.

    Hi Anusha,
    ME had MicroITS as UI.
    MI has JSP and AWT as UI programming.
    From the above discussion its clear that JSP is the best option for programming.
    PS: AWT was depricated by SUNMicro.
    I just thought of sharing the history of MI.
    just to share to you a "history" of mobile projects in SAP.
    the current MI was actually a merged project from two mobile
    projects - the old Mobile Engine and the unheard Mobile
    Development Framework (MDF). when these projects were
    restructured, the ME was extended with some functionalities
    such as the SmartSync which was actually the replication
    technology used in MDF. MDF client was based on C++ and
    uses the CEDB as the database. it was not chosen to be
    the client due to its platform-dependency. MDF was already
    a working product when the restructuring happened. and there
    were some client functionalities like xml based GUI and
    metadata/logic definition that the current MI client doesn't
    have.
    Hope this is helpful.
    Close the thread if your done with your clarification.
    Cheers,
    Karthick

  • What is difference between sy-tabix and sy-index.

    SAP Seniors,
    Can you please let me know what is difference between sy-index and sy-tabix.
    I read the SAP help, it is confusing for me. it looks like both are same from help. please help me.
    Thank you
    Anitha.

    HI,
        Here is a brief description of difference between SY_TABIX and SY_INDEX and using them with several conditions.
    SY-TABIX
    Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
    APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
    COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
    LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
    READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
    SEARCH <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
    SY-INDEX
    In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.
    Hope this helps.
    Thank you,
    Pavan.

  • Difference between sy-tabix and sy-index?

    tell me about sy-tabix and sy-index?what is the difference between sy-tabix and sy-index?
    Moderator Message: Please search before posting. Read the [Forum Rules Of Engagement |https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] for further details.
    Edited by: Suhas Saha on Jun 18, 2011 5:33 PM

    HI,
        Here is a brief description of difference between SY_TABIX and SY_INDEX and using them with several conditions.
    SY-TABIX
    Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
    APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
    COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
    LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
    READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
    SEARCH <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
    SY-INDEX
    In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.
    Hope this helps.
    Thank you,
    Pavan.

  • What is difference between sy-index and sy-tabix and where both are using ?

    what is difference between sy-index and sy-tabix and where both are using ?

    hi nagaraju
    sy-tabix is in Internal table, current line index. So it can only be used while looping at the internal table.
    sy-index is in Loops, number of current pass. This you can use in other loop statements also (like do-enddo loop, while-endwhile)
    SY-INDEX is a counter for following loops: do...enddo, while..endwhile
    SY-TABIX is a counter for LOOP...ENDLOOP, READ TABLE...
    Here is an example from which you can understand the difference between sy-tabix and sy-index.
    Itab is an internal table with the following data in it.
    id Name
    198 XYZ
    475 ABC
    545 PQR.
    loop at itab where id > 300.
    write :/ itab-id, itab-name , sy-tabix, sy-index.
    endloop.
    My output will be :
    475 ABC 2 1
    545 PQR 3 2
    Sy-tabix is the index of the record in internal table.
    sy-index gives the no of times of loop passes.
    So, for the first record in the output (475 ABC), 2 is the index of the record in internal table and as it is first time loop pass occured, sy-index value is 1.
    Regards,
    navjot
    award points

  • The difference between chapter markers and dvd studio pro markers

    Does anyone know what is the difference between chapter markers and dvd studio pro markers? I can not find anywhere on Google. Also in the tutorials I have seen, suggesting DVD Studio Pro markers, but it did not mention the chapter markers.
    Thanks,

    "Adding Chapter and Compression Markers to Your Sequence
    Once you have your edited sequence or program finished, you can add markers to the sequence for use on DVD. Markers are reference points you can place within clips or sequences that identify specific frames. There are two kinds of markers you can add that directly relate to authoring a DVD—chapter markers and compression markers.
    • Chapter markers allow DVD authoring applications to create a navigable chapter list for your exported QuickTime movie. Chapter markers force MPEG keyframes (known as I-frames) at their location, since the DVD specification requires an I-frame at each chapter point.
    • Compression markers identify areas of abrupt change and include two types: those that are automatically inserted by Final Cut Pro at all edit points, and those you manually place in the clip or sequence. Like chapter markers, compression markers force I-frames at their location, although in this case it is for better quality encoding, and they are not used to create a chapter list.
    Note: When you export a QuickTime movie, you have an option to export various kinds of markers, including compression, chapter, or DVD Studio Pro markers. *When you choose to export DVD Studio Pro markers, Final Cut Pro actually exports chapter markers and all compression markers.* This includes compression markers you set manually, as well as ones created automatically by Final Cut Pro at edit and transition points."
    From the Final Cut Pro User Manual.
    So, JS was right the first time

  • The difference between an iphone and an ipod touch?

    i want to know if the difference between an iphone and an ipod touch is just that the iphone is like a phone that has internet and is a phone. or what else is it?

    The iPhone includes the same as an iPod Touch but also includes a phone, a camera, and a GPS radio.
    In addition to having internet access via wi-fi, the iPhone also has internet access via the cellular network, so as long as you have cellular reception with the iPhone, you have access to the internet in addition to having access via an available wi-fi network.

  • The difference between system restore and last good known configuration

    hi,
    what is the difference between system restore  and last good known configuration.
    in which situation you use system restore ,and in which situation you use last good known configuration.
    very short answer wil be enough.
    thanks
    johan
    h.david

    Last Known Good Configuration deals only with Starting Windows eg. a bad registry or incorrect driver is preventing Windows to start.It recovers the registry settings of HKEY_LOCAL_MACHINE\System\CurrentControlSet
    While System Restore uses restore points to return your system files and settings to an earlier point in time without affecting personal files. Restore points are created automatically every week, and just before significant system events, such as the installation
    of a program or device driver. You can also create a restore point manually.You can undone system restore but there is no such option in Last Known Good Configuration.
    Last Known Good Configuration is disabled in Windows 8 or,Windows 8.1 by default.
    Try using Last Known Good Configuration if you can't start Windows, but it started correctly the last time you turned on the computer.
    Try using System Restore to return the system to an earlier point in time when things worked correctly.
    S.Sengupta, Windows Entertainment and Connected Home MVP

  • Difference between sy-datum and any given date

    Dear Friends;
    I have one query  regarding DATE  I wanna calculate the difference between
    SY-DATUM and ANY GIVEN DATE . Is there any function or code available that take one parameter as sy-datum and another parameter as any given date and give result as no. of days between them
    Regards;
    Parag

    DATA: DATEDIFF TYPE P.
    CALL FUNCTION 'SD_DATETIME_DIFFERENCE'
      EXPORTING
        date1                 = '20071122'
        time1                 = '000001'
        date2                 = '20070905'
        time2                 = '000001'
    IMPORTING
       DATEDIFF               = DATEDIFF
    EXCEPTIONS
       INVALID_DATETIME       = 1
       OTHERS                 = 2.
    Greetings,
    Blag.

  • Difference between sy-uline and uline

    Hi All,
    Any one of you please update me what is the difference between sy-uline and uline. Also when i give sy-uline in top-of-page event it gives error.
    Thanks
    sankar

    with ULINE u can specify the position from where the ULINE should start
    corresponds to WRITE AT 3(10) SY-ULINE.
    ULINE AT 3(10) NO-GAP will supress the spacess after the under line
    ex :  1
    uline at 4(10).
    write : / 'My Program'.
    uline at 4(10).
    ex : 2
    write : 'My Program' , sy-uline.

Maybe you are looking for

  • Pivoting using Model Clause Vs pivoting using Aggregate Fun(Case) statement

    Hi, I just wanted to know which option is better for pivoting the data if the data is like: Grp1 Grp2 Day_week Sales 1 1 Sun 200 1 1 Mon 100 1 2 Sun 1000 and so on... The output should be: Grp1 Grp2 Sun Mon ...... 1 1 200 100..... 1 2 1000 NULL.... I

  • Itunes 7.1 install

    Please help!!! i have for the fourth time tried in vain to install itunes 7.1 i get error message saying service ipod could not be installed verify you have sufficient privileges to install system services....??? got my ipdnano all crarged up and not

  • Why does lightroom 3.3 delete files it 'fails' to move? and why does it fail?

    I'm in the process of moving a bunch of images around between machines, so from a remote machine I copied 10gb or so of .cr2, .jpg and .thm files into a temporary holding location on a local sata drive. I then started an import on the machine from th

  • Error:Your Purchase Could Not Be Completed

    I want to buy final cut x pro, last version,  but I got an error:Your Purchase Could Not Be Completed (There was an error in the App Store. Please try again later. (null) Additional info 1. the PC has final cut pro 7.0.3 installed 2. Im using  anothe

  • So angry with BT

    All i have had is trouble since joining BT in nov i had my order cancelled 4 times !! Without being told about it .... Then i had 3 accounts opened !! And charged for .... Then they couldnt sort my tv out for 3 weeks ... So in total i was waiting fro