Please give me an exemple of an applet using a swing object.

Please give me an exemple of an applet using a swing object.thank you.

My problen is that the swing object do not appear in
my applet. They appear only if i invoque the repaint
methode.use JApplet, since awt components are heavyweight, and swing components are lightwieght, then your swing components get over painted with aplets background or something.
anyhow, in your applet you may create JFrame, that would be swing component and if you set it visible, then it will be even visible.
they say that mixing swing and awt is not good idea, especially when you don't know what you're doing (which might be true in your case)
so try to migrate your app from AWT based stuff to SWING based stuff, or write your own AWT components that do the job whih you needed swing component for at the first place.
but if you need to mix awt and swing, then i thing that you should not paint the fole area of applet in applets paint method -- but here i'm not sure, never mixed 'em.
so you might try to create an applet which paint() method you leave empty and to which you add some JComponent*.
and see what happens, maybe this JComponent will be visible.
* -- JComponent is most likely just gray, you might want to add some subclass of it -- JButton, JTextField, JSomethingElse.

Similar Messages

  • Java applet using the Swing API

    write a Java applet using the Swing API to manage a PC repair shop. When a PC is brought in for repair, a member of staff will use this applet to log it into the system as a repair job. They will also be able to use the applet to manage the job e.g. allocate a person to carry out the repair and enter costs.
    You must not use a tool such as JBuilder to generate Java code. If you use code from elsewhere e.g. a text book, you must highlight the code and state the reference clearly and include a photocopy of the relevant pages from the text book or other source.
    You should hard-code some initial data into your applet. You should not store any data in a file or database.
    Level of functionality you should attempt to implement:
    Level 1 � Your applet should:
    a.     As a minimum, your program should store (in memory) at least 10 repair jobs. For each repair job, you need to store:
    �     The name and phone number of the customer bringing the PC in for repair;
    �     A brief textual description of the problem;
    �     Whether the PC is under warranty or not.
    b.     Your program must allocate and display a unique number for the job once it is accepted.
    c.     The user must be able to view the details of jobs. They should be able to select either:
    �     All the jobs in the system; or
    �     Jobs being carried out under warranty.
    Level 2 � Your applet must meet the requirements for level 1. In addition it should:
    a.     You should carry out appropriate validation checks on input data e.g. the phone number contains all digits.
    b.     System should cope with an unlimited number of jobs.
    c.     The user should be able to select a job and then allocate a repairer to that job.
    d.     The user should be able to display a list of jobs for each repairer.
    Level 3 - Your applet must meet the requirements for level 1 and 2. In addition it should allow the user to:
    a.     Select a job and input the cost of repair for:
    �     the number of hours labour;
    �     parts.
    b.     Select a job and present the user with a cost for the labour (hard code an hourly labour cost) and parts, plus a total for that job. For jobs under warranty the total will be zero, however the cost of labour and parts will be shown.
    c.     Be able to inform the business of the total expected income from the all the jobs in the system that are not under warranty.
    Level 4 � Your applet must meet the requirements for level 1 to 3. In addition:
    a.     The user should be able to enter a job priority which can be identified as high, medium or low.
    b.     Each repairer should be able to view a list of their jobs in order of priority.

    Done, what next ?
    Noah

  • Please help...Problem with 3D Applet using JRE 1.5

    Hi all,
    I have an applet which uses sun opengl 1.3.1 plugin to render some 3D graphics. It is working fine with JRE 1.4.2_06, but not showing the 3D graphics with the latest JRE 1.5 release. I tried to repaint using available API with no success.
    Please help asap,
    Thanks in advance
    prasad

    I wonder if you have the same problem as me... Maybe we can find a solution for us both, no need for me to open a new thread for this topic then...
    I wrote an applet using Swing and compiled it using JavaSDK 1.4.x. I also installed the 1.4.x JRE for both of my test browsers. In Mozilla 1.1 the applet displays properly all the time. In IE6 SP1 it sometimes works as intended but sometimes the applet simply stops working, as per my Java Console somewhere after invoking the "start" method. Parts of the applet simply become gray and when I resize it - I have a JFrame in my applet - the whole JFrame becomes gray and does not respond to input nor it redraws itself. Shutting down IE does not close the JFrame(although the java console reports normal program termination and cleanup) and the only way to close it is through the task manager. I am using Windows 98SE btw.
    Does it sound similiar to your problem? It happens ONLY with IE, not with Mozilla. Anybody has an idea on what it could be? I doubt there's an error in my code...

  • I have been trying to find a way of contacting you by e-mail so that I can write to you about a problem I have. Could you please give me an e-mail address to use for problems or refunds from i-tunes? Many thanks

    I have been trying to find an e-mail address for Apple problems that are not on your list of questions usually asked. Could you therefore let me have an e-mail address for being able to sort a problem I have with i-tunes purchasing for audo books as I by mistake downloaded a book instead of an audio book and would like a refund for The One I Love by Paul Pilkington so that I can download the audio book. This is the first time that I have used this facility and I obviously got confused with books and audio books, I need audio books because I have an I Pod Nano and I like to listen to my books on this. Look forward to your reply.
    Regards, Sandra

    Sandra,
    See this Apple support document for information on reporting an issue with your iTunes purchase.
    http://support.apple.com/kb/HT1933
    B-rock

  • Submitt query button issue still pending  please give sulotion

    hi
    im facing problem submit query button . im working in as 10g r2. Every thing is working fine but when i click on submit query button of parameter form. it gives error and and page cant find. its reason that it takes localhost name in url and localhost(asserver.dht.com) is not recognized on internet. To resolve this issue i designed my own parameter form in html and in post method i use my domain name( www.ddgi.com) which is registered on internet. please give me solution so that i can use default parameter form. where from it picks machine name so that i can change it accoding to my domain name.
    My localhost name is asserver.dht.com
    my registered domain on internet is www.ddgi.com

    Hi,
    I'm facing almost the same problem. I'm working in AS 10G r2 as well. Our application is working with port:7779 and when I point on submit query button it refers to http://server_name/reports/rwservlet? but without :port option. When I run the same report on the server it works just fine but can't run on another station. I've already google it but can't find any suitable information.
    Thanks in advance!

  • Dear sir.   I am using my iPhone 5 in UAE now . I want to use my iPhone 5 in my country Bangladesh during December 2013 . Please be inform that it is possible to use ? Any country lock have in iPhone 5 ? If any country lock available how can I use ?

    Please give me advice , if I want to use my iPhone 5 in different countries any country lock available or not

    Talked to Vodafone. They said that if my phone is indeed unlocked that theoretically I should be able to stop into one of their stores and pick up a prepaid (PAYGO) sim and it will work. The only problem is, they don't have any prepaid sims yet. Hopefully they will when I arrive there in 2 weeks. I may pick up a nano sim cutter just in case they don't.

  • Memory leak with 1.6.0_07 in applet using Swing

    Java Plug-in 1.6.0_07
    Using JRE version 1.6.0_07 Java HotSpot(TM) Client VM
    Windows XP - SP2
    I have a commercial application that has developed a memory leak with the introduction of the latest plugin. The applets chew up memory and eventually freeze. They did not before. Using jvisualm I see a build up of native arrays, primarily int[][] and char[]. I'm still investigating. Anyone have a similar experience?
    The Applet uses a swing interface, uses buffered images and swing timers, and regularly performs http connections to the server which result in actions via the SwingUtil.invokeLater() method.

    I am Using Internet Explorer Browser Version 6.0.Huge security hole.
    Its not throwing Error / Exception Wrap a try/catch at the highest level possible.
    Catch 'Throwable'. And log/display it somewhere.

  • Exception when readObj() - please give me a hand!

    I am writing a Client/Server application where Server simply sends object to the client. The first object goes well but when the client side reads the second object, the exception caught was "Type code out of range, is -84". Can anybody kindly give me a hand? Thanks very much in advance!
    Result on Client:
    C:\thesisTest>java TestCli
    @Line 1: Get ready!!!
    Type code out of range, is -84
    receive error.
    Source for Server :
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import sendNode;
    public class TestSer {
         static sendNode sendNodeObj = new sendNode();
    static String inputLine;
         public static void main(String[] args) throws IOException {
    ServerSocket serverSocket = null;
    try {
    serverSocket = new ServerSocket(4444);
    } catch (IOException e) {
    System.err.println("Could not listen on port: 4444.");
    System.exit(1);
    Socket clientSocket = null;
    try {
    clientSocket = serverSocket.accept();
    } catch (IOException e) {
    System.err.println("Accept failed.");
    System.exit(1);
    OutputStream o = clientSocket.getOutputStream();
    ObjectOutput out=new ObjectOutputStream(o);
    BufferedReader in = new BufferedReader(
                        new InputStreamReader(
                        clientSocket.getInputStream()));
    sendNodeObj.sendMsg="@Line 1: Get ready!!!";
    sendNodeObj.typeNode=-1;
    out.writeObject(sendNodeObj);
    out.flush();
    out=new ObjectOutputStream(o);
    sendNodeObj.sendMsg="@Line 2: Please input Start";
    sendNodeObj.typeNode=-1;
    out.writeObject(sendNodeObj);
    out.flush();
    inputLine = in.readLine();
    while (!inputLine.equalsIgnoreCase("Start")) {
         sendNodeObj.sendMsg="@Error, Please input Start";
    sendNodeObj.typeNode=-1;
    out.writeObject(sendNodeObj);
    out.flush();
    inputLine = in.readLine();
    out.close();
    in.close();
    clientSocket.close();
    serverSocket.close();
    Source for Client:
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.applet.Applet;
    import sendNode;
    public class TestCli extends Applet {
    static sendNode recNodeObj=null;
    public static void main(String[] args) throws IOException {
    BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
    Socket kkSocket = null;
    PrintWriter out = null;
    try {
    kkSocket = new Socket("127.0.0.1", 4444);
    out = new PrintWriter(kkSocket.getOutputStream(), true);
    } catch (UnknownHostException e) {
    System.err.println("Don't know about host.");
    System.exit(1);
    } catch (IOException e) {
    System.err.println("Couldn't get I/O for the connection to: taranis.");
    System.exit(1);
    InputStream i= kkSocket.getInputStream();
    ObjectInput in= new ObjectInputStream(i);
    try {
         recNodeObj = (sendNode)in.readObject();
    System.out.println(recNodeObj.sendMsg);
         recNodeObj = (sendNode)in.readObject();
    System.out.println(recNodeObj.sendMsg);
    if (recNodeObj.sendMsg.equalsIgnoreCase("@Line 2: Please input Start")) {
    out.println("Start");
    } catch (Exception e) {
    System.out.println(e.getMessage());
    System.out.println("receive error.");
    System.exit(1);
    out.close();
    in.close();
    stdIn.close();
    kkSocket.close();

    You are not being consistent in the way you use ObjectOutputStream and ObjectInputStream.
    For every new ObjectOutputStream you create you need a corresponding new ObjectInputStream, because ObjectOutputStream writes a header that ObjectInputStream reads.
    In general, you probably don't want to use multiple OutputOutputStream objects on a given underlying socket, because it is ineffecient in the way class names etc are encoded.
    Sylvia.

  • I want to start a new iTunes U course for catolog and I don't know what can I do please give me description about this title.

    I want to start a new iTunes U course for catolog and I don't know what can I do please give me description about this title.

    If you haven't already done so then you can contact iTunes support via this page and ask them why the message is appearing (these are user-to-user forums, we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • Hi SAP FI/CO GURUS ...... PLEASE GIVE ME INTERVIEW QUESTIONS ON SAP FI/CO

    Hi FI/CO gurus
    I require your great help to get my brother into SAP House. He had done his FI/CO training and he is trying as fresher into SAP. So i request you to please give me interview questions on SAP FI/CO in topic wise. The reason i am asking here in this forum is, a lot of gurus who are having great experience are there in this group. if i get help from these gurus, that will be great help to my brother into get into SAP FI/CO.
    So i request you to please send me interview questions on SAP FI and CO in topic wise. Awaiting for your reply.
    Regards
    Raj

    Hi,
    Please find below few questions on FI. I think those are very useful for intervew
    SAF FI Technical Interview Questions 1
    1. Tell me about FI Organizational structure?
    Ans:     Client
                   |
          Operating Concern
                   |
    Controlling area1       Controlling Area 2
             |
    Co. Code 1 Co. Code 2
        |
    Bus area 1  Bus area2  Bus Area3  Bus Area 4
    2. How many Normal and Special periods will be there in fiscal year, why do u use special periods?
    Ans: 12 Normal posting period and 4 special periods are in the fiscal year which can be used for posting tax and audit adjustments to a closed fiscal year.
    3.Where do you open and close periods?
    Ans: PPV is used to open and close the periods based on a/c types considering GL Accounts. Tr. Code. OB52.
    4.What do you enter in Company code Global settings?
    Ans: 4 digit Alphanumeric key.
    Name of the company
    City
    Country
    Currency
    Language
    Address
    5.What is document type, and what does it control? Examples.
    Ans: Document type is nothing vouchers containing line items. Several business transac! tions can be identified within a particular document type.
    It controls the document number ranges.
    It controls the Header part of document
    IT controls the line item level of the document
    Helps filing of physical document 
    6. What is posting key and what does it control?
    Ans: These are special classification keys. Two character numerical key it controls the entry of line items.
    Posting key determines Account type, Debit/credit posting, Field status of transaction.
    7. What is field status group, what does it control? 
    Ans: FSG is mandatory field in ! GL Creation. You use this field to define which fields are displayed when you post business transactions to a G/L account. 
    A field may have one of the following statuses.
    - Suppressed
    - Display
    - Optional
    - Required
    8. What is chart of account and how many charts of accounts can be assigned to a company?
    Ans: Chart of account is a list of all G/L accounts used by one or several company codes.
    For each G/L account, the chart of accounts contains the account number, account name, and the information that controls how an account functions and how a G/L account is created in a Company code.
    You have to assign a chart of accounts to each company code. This chart of accounts is the Operating chart of accounts and is used for the daily postings in this company code.
    You have the following options when using multiple company codes.
    You can use the same chart of accounts for all company codes
    If the company codes all have the same requirements for the chart of accounts set up, assign all of the individual company codes to the same chart of accounts. This could be the case if all company codes are in the same country.
    In addition to the operating chart of accounts, you can use two additional charts of accounts If the individual company codes need different charts of accounts, you can assign up to two charts of accounts in addition to the operating chart of accounts. This could be the case if company codes lie in multiple countries.
    The use of different charts of accounts has no effect on the balance sheet and profit and loss statement. When creating the balance sheet or the profit and loss statement, you can choose whether to balance the co! mpany codes which use different charts of accounts together or separately.
    9. What does definition of a chart of account contains?
    Ans: chart of account key
    Name
    Maintenance language
    Length of the GL Account Number
    Controlling Integration
    Group chart of accounts (Consolidation)
    Block Indicator
    10. Can one COA be assigned to several companies?
    Ans: yes. One COA can be assigned to several companies.
    11) What is account group and what does it control? 
    Ans: Account group determines which fields you can configure on the G/L master record. It is necessary to have at least two one for B/S and another one for P&L a/c.
    It controls the Number ranges of GL A/C.
    The status of fields of the master record of GL belongs to company code area.
    12) What is reconciliation account; can you directly enter documents in that a/c?
    Ans: When you p! ost items to a subsidiary ledger, the system automatically posts the same data to the general ledger. Each subsidiary ledger has one or more reconciliation accounts in the general ledger. 
    We can’t use reconciliation account for direct postings.
    13) How do you control field status of GL master records and from where do you control! 
    Ans: Field status variant is maintained all FSGs.
    14) What are the segments of GL master record?
    Ans:
    - COA Segment
    A/C group
    Nature of account
    Short text
    GL a/c long text
    Trading partner
    Group Account Number
    -  Company code segment
    Account currency
    Tax
    Reconciliation a/c for a/c type
    OIM,LID,FSG.
    15) What does Field status group assigned to a GL master record controls?
    Ans: It controls the account assignments that are made to the account. Specifically the field status group controls whether postings to cost centers, internal orders, profitability segments and so on are required, not allowed (suppressed), or optional.
    16) What is Country and operational chart of account? Why do you use group chart of account?
    Ans: Operational chart of account – Day to day activities It is mandatory.
    Country COA – It’s used for legal specific requirement of each country. It’s additional and optional.
    Group COA used for consolidation of Company codes. This is for group consolidation purpose.
    17) What are all the segments in a Customer/Vendor master record?
    Ans: Segments in Customer           Segments in Vendor
    -      General Data segment            General data segment
    -      Company code segment         Company code segment
    -      Sales area segment                 Purchasing organization Segment
    18) What is open line item management? What do you mean by clearing open line items?
    Ans: Open item management is further reconciliation function. OIM allows you to display the open and cleared items and amounts in an account. OIM should be used if an offsetting entry is made for every line item posted in the account. The a/c is reconciled and cleared against another account. Ex. Salary clearing account and GR/IR Clearing account.
    19) What is residual payment and part payment?
    Ans: Residual payment it clears original invoice with incoming amount and create new line item for remaining outstanding amount.
    Partial payment it leaves the original invoice amount and creates new
    line item for incoming amount.
    20) What is internal and external number ranges?
    Ans: Internal Number Ranges: Doc. No will be provided by the system automatically in serial order allotting the next available progressive number. The number must be in numerical.
    External Number ranges: Doc. No will be given manually by the end user. System will not lock no automatically in this case. User can pick the number randomly. Number may be an alpha numeric.

  • Please give me idea now I compile all branch data in head office only new r

    Hi master
    Sir I have 5 office In different city and one head office in Karachi all branch have same oracle system my question is how I get new data and compile for accumulative reporting
    I want only new record and modify record not old record
    Old record already I import
    When I use oracle import and export tool that no give me right result
    If xxx table exists in database then import tool not replace and no insert or no replace with previous data with new modify data
    Such as
    First time
    V_no=897 have debit amount 3998 is Islamabad branch and i export form Islamabad and import in Karachi office
    Next time
    Islamabad office change v_no=897 debit amount with 76555 and add many new record
    I export form Islamabad and import in Karachi office but system no change and not add new record in Karachi office
    Please give me idea now I compile all branch data in head office only new record and modify record
    Thanks
    aamir

    Here a very simple example with table EMP, assuming source table has a primary key. Firstly you create a materialized view log on source table (necessary for fast refresh) :
    SYS@db102 SQL> conn test/test
    Connected.
    TEST@db102 SQL> create materialized view log on emp including new values;
    Materialized view log created.
    TEST@db102 SQL> then at destination DB/user :
    TEST@db102 SQL> conn scott/tiger@test10
    Connected.
    SCOTT@test10 SQL> create database link test
      2  connect to test identified by test
      3  using 'db102';
    Database link created.
    SCOTT@test10 SQL> create materialized view emp_mv
      2  refresh fast
      3  as select * from emp@test;
    Materialized view created.
    SCOTT@test10 SQL>Now emp_mv is the exact copy of emp. To refresh the MV, to reflect changes :
    SCOTT@test10 SQL> exec dbms_mview.refresh('EMP_MV','F');
    PL/SQL procedure successfully completed.
    SCOTT@test10 SQL>                                                                  ...but I strongly recommend you to read the documentation...

  • Please give me idea how I highlight the gird row which have

    Sir
    I have gird with 5 column
    Vno
    Code
    Dept
    Date
    Amount
    Sir my need is which record have above 5000 amount that color read and other color blue
    It means above 5000 highlight in grid
    Please give me idea how I highlight the gird row which have above 5000 maount
    Thank
    aamir

    PROCEDURE pr_Set_VA (p_VA IN VARCHAR2) IS
    v_Feld VARCHAR2 (30);
    v_Item VARCHAR2 (61);
    v_Block VARCHAR2 (30);
    BEGIN
    v_Block := :SYSTEM.CURSOR_BLOCK;
    v_Feld := Get_Block_Property (v_Block, FIRST_ITEM);
    WHILE (v_Feld IS NOT NULL) LOOP
    v_Item := v_Block || '.' || v_Feld;
    Set_Item_Instance_Property (v_Item, CURRENT_RECORD, VISUAL_ATTRIBUTE, p_VA);
    v_Feld := Get_Item_Property (v_Item, NEXTITEM);
    END LOOP;
    END;

  • I have installed 2010 microsoft office 2010 home and business version for my laptop,and i have installed lync 2013.Now i want create online lync meeting from outlook,but i am unable view that lync icon in outlook.Please give me the solution for this que

    I have installed 2010 Microsoft office 2010 home and business version for my laptop,and I have installed lync 2013.Now i want create online lync meeting from outlook,but i am unable view that lync icon in outlook.Please give me the solution for this issue.
    Regards
    Raghavendar

    Hi Raghavendar,
    Generally, when you install Lync 2013 in the computer with Office 2010, a Lync Meeting Add-in will be installed and enabled in Outlook 2010. Please follow these steps to check it:
    1. In Outlook, click the File tab, click Options, and then click
    Add-Ins.
    2. Please take one of the following actions:
    If the add-in is in the Inactive Application Add-ins list, follow these steps:
    a. In the Manage drop-down list at the bottom of the dialog box, click
    COM Add-ins, and then click Go.
    b. Click to select the check box next to the add-in, and then click OK.
    The New Online Meeting button should now be available in
    Calendar View, and the Online Meeting button should be available when you create a new calendar item.
    If the add-in is in the Disabled Application add-ins list, follow these steps:
    a. In the Manage drop-down list at the bottom of the dialog box, click
    Disabled Items, and then click Go.
    b. Select the add-in, and then click Enable.
    c. Restart Outlook, and then verify that the add-in is displayed in the
    Add-ins dialog box.
    The New Online Meeting button should now be available in
    Calendar View, and the Online Meeting button should now be available when you create a new calendar item.
    3. In Event Viewer, view the Application log to see whether an error was logged for Outlook, for Lync 2013, the Lync Meeting Add-in for Microsoft Office 2013.
    Thanks,
    Winnie Liang
    TechNet Community Support

  • How  to transfer data from one system to another by datamart please give de

    how  to transfer data from one system to another by datamart please give details

    Hi Deba,
    Find the below SAP help doc which may help u...
    http://help.sap.com/saphelp_nw70/helpdata/en/12/43074208ae2a38e10000000a1550b0/frameset.htm
    Also find the below threads...
    Loading data from one cube to another cube.
    data copy from infocube to infocube in two different BW systems
    Delta when loading from ODS to ODS
    reg datamart
    Data mart flag
    Regards,
    KK.

  • Feature request: please give the ability to close all background apps at once!?

    Hello. Please oh please give us the ability to close all open/running apps with one click or swipe. I, like many users, like to close running apps (much like on my computer) to keep my ipad/iPhone running fast. I know you guys say that background apps are put on pause and don't slow things down but that is simply not the case in real world usage. All the time my iPhone or iPad becomes sluggish and if I swipe 30 times to close all the apps the sluggishness goes away. I like the simple and easy to use ios, but a little more control for the user would be very beneficial. This, I would guess, is one of the main reasons one would get an android device instead, because they require for fine tune control. Giving us this feature, amoung a few others, would be a win win. The end user get more what they need, and apple steals away (or keeps) more loyal apple buyers.

    Send your suggestion to Apple at http://www.apple.com/feedback/ipad.html
    This is a user to user technical help forum. You aren't talking to Apple here.

Maybe you are looking for

  • How to make dataload fast into a table having CONTEXT index on CLOB column?

    Hi all, I have a table with the follwing structure :    CREATE TABLE file_table (        file_id    NUMBER(10) PRIMARY KEY,        file_name  VARCHAR2(3000),        file_data CLOB);I am loading around 50,000 files into the table using SQL*LOADER. LOA

  • Problem in material repliction

    Hi friends, I have a problem on Material replication from R/3 to EBP. I had configured all the required settings in EBP as well as in R/3. Whenever we are starting initial loading R3AS I am getting outbound queues in EBP instead of R/3. I am getting

  • User defined Function in materlized view???

    Hi All: can we use user defined functions in materlized views. If anybody know about it. Please help me. Thanks Ali

  • How to Upgrade Solaris Package ?

    Hi, I created a solais package (*.pkg), which I've installed with the following command: "pkgadd -d mypkg.pkg" 1. What command should I use in order to upgrade it to a higher version? 2. What are the changes I have to do in the installation pkg for s

  • N86 system error when connecting to college wifi?

    when i try to connect to college wifi i input the settings required and install certificates because it is wpa2 enterprise and i connect but when i want web browse or open app with wlan it comes up with system error and exclamation mark. how can i fi