Tree Control --- Urgent help needed

Hi all,
I want to display a screen , where there are 2 parts. A tree structure on the left of my screen and on clikcing on one node, I want screen x to be displayed on the right side of the screen.
On clikcing on other node, then screen y has to be displayed on the right side( still menu shud be on the left side)..
Pls give me suggestions.
Message was moved form SDN Content Suggestion Forum. Edited by: Anand Mandalika.

Hi,
This can be done using ALV tree,
See this link for sample program in ALV tree with sample outputs.
http://www.sapdevelopment.co.uk/reporting/alv/alvtree.htm
Thanks & Regards,
Juidth.

Similar Messages

  • URGENT HELP NEEDED ... Tomcat Realm and JRE1.4 plug-in problem

    I have tried the Security Realm of Tomcat. Since I do not have
    an LDAP server, I decided to use the Tomcat-users.xml file in
    Tomcat\conf directory.
    I added the following lines of code in the web.xml file.
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Entire Application</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <!-- NOTE: This role is not present in the default users file -->
    <role-name>webviewer</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Tomcat Manager Application</realm-name>
    </login-config>
    The <role-name> "webviewer" is added into "Tomcat-Users.xml" as the following:
    <tomcat-users>
    <user name="test" password="password" roles="webviewer" />
    </tomcat-users>
    So, now when we type the url: http://localhost:8080/adbpdbre/default.htm, TOMCAT shows a dialog box asking for UserName: and Password:Now, only when we give the username and password, it shows the page. This is exactly what we want.
    But the problem now is, this default.htm page, has 5 links to 5 applets. The first time that I click on one of these links, the JRE plug of 1.4 shows a dialog again asking for the username and password. Till I dont provide the username and password the system doesnt go ahead and applet doesnt load. I do not want the JRE to ask me for the username/passwords again..How to avoid this ?
    Can you give me some more information on this. Ultimately in the production usage, we will be using LDAP and not Tomcat's memory realm.
    URGENT HELP NEEDED ... I need to get back to my client on this.
    Help would be v. much appreciated.

    In the config file, you 're essentially saying that you want Tomcat to prompt for usr/passw on every request (url-pattern = /*) made by a 'webviewer', and that's exactly what Tomcat is doing.
    Consider using specific url-patterns & roles for resources to be protected. If for now, all you need is to protect the first page, use a more specific url-pattern.
    Just an advice : if you'll be using LDAP in production, do not waste time with Tomcat's Security Realm and the BASIC authentication type, since the two have not much in common. Start reading doc on LDAP, and code a prototype, or even better, a vertical slice of the app (i.e a proof of concept).

  • URGENT HELP NEEDED - iPhone 3Gs no longer detected or charged by MacBook

    My iPhone 3Gs (3.1) has been running fine, until several hours ago today, when I plugged it to my MacBook, the iPhone is no longer detected - it doesn't show up in iTunes, nor it is charged. I tried opening iPhoto, and it wasn't there too. Not with Image Capture too. I tried charging it using the out-of-box wall charger using the same out-of-box USB cable I use for MacBook, and it can be charged without any problem. Then I put it into Recovery mode, and there iTunes can see it. I don't want to restore it before I figure out exactly what went wrong, as I don't want the restore process somehow gets stuck in the middle that the connection is lost again.
    I've tried reinstalled iTunes, including completely removal of Apple Mobile Device Support, as instructed by Apple. But still no luck.
    I've tried switching to another USB port of my MacBook. No luck.
    My iTunes is the latest 9.0.1, and my Mac OSX is 10.6.1. My iPhone is on 3.1, upgraded from 3.0.
    I've read from web that it seems I'm not the only one out there having this problem. But none of them seem having any real working solution.
    Urgent help needed & appreciated. Millions of thanks in advance.
    Gary

    1. I used both cables - theirs & mine ... and on several macs
    2. yes, same cable for wall & mac
    3. as said, i did completely remove & install itunes (incl. apple mobile device support), as instructed on the apple webpage
    anyway, did a restore just now. it seems okay now. but the problem is i have no idea what cause this, and i can't replicate the problem. so i don't know when it will happen again ... maybe a bug with os 3.1 ... others on web said os 3.1 is quite buggy ...

  • Urgent help needed, can I restore N900 Backup file...

    i owned a N900 (now sold out)
    before selling i took backup of contacts from backup restore option in application section
    now i bought a N8 but i m not able to restore my contacts
    1. is there any way to restore them in N8?
    2. if not, can i convert them in TEXT or any readable format
    urgent help needed
    thanks in advance

    The backup procedures built into the phone are only designed for restoring to the same phone (ie: in case or data corruption, software update or repair etc.), they can't usually be used to restore to a phone with a different operating system.
    You should have backed up with Ovi Suite before selling the N900, that would have been able to restore to the N8.

  • Urgent help needed; Database shutdown issues.

    Urgent help needed; Database shutdown issues.
    Hi all,
    I am trying to shutdown my SAP database and am facing the issues below, can someone please suggest how I can go about resolving this issue and restart the database?
    SQL> shutdown immediate
    ORA-24324: service handle not initialized
    ORA-24323: value not allowed
    ORA-01089: immediate shutdown in progress - no operations are permitted
    SQL> shutdown abort
    ORA-01031: insufficient privileges
    Thanks and regards,
    Iqbal

    Hi,
    check SAP Note 700548 - FAQ: Oracle authorizations
    also check Note 834917 - Oracle Database 10g: New database role SAPCONN
    regards,
    kaushal

  • Urgent help needed - new to Macs, accidently cut and paste over top of photo folder and now no sign of folder or file, no auto back-up in place, how can I restore photos pls

    Urgent help needed - new to Macs, accidently cut and paste over top of photo folder and now no sign of folder or file, no auto back-up in place, how can I restore photos pls

    Thanks for prompt reply, yes we have tried that but have now closed down the browser we where the photos were.
    We haven't sent up time machine, do you know whether there is any roll-back function on a Mac?
    Thanks

  • Urgent help needed with un-removable junk mail that froze Mail!!

    Urgent help needed with un-removable junk mail that froze Mail?
    I had 7 junk mails come in this morning, 5 went straight to junk and 2 more I junked.
    When I clicked on the Junk folder to empty it, it froze Mail and I can't click on anything, I had to force quit Mail and re-open it. When it re-opens the Junk folder is selected and it is froze, I can't do anything.
    I repaired permissions, it did nothing.
    I re-booted my computer, on opening Mail the In folder was selected, when I selected Junk, again, it locks up Mail and I can't select them to delete them?
    Anyone know how I can delete these Junk mails from my Junk folder without having to open Mail to do it as it would appear this will be the only solution to the problem.

    Hi Nigel
    If you hold the Shift key when opening the mail app, it will start up without any folders selected & no emails showing. Hopefully this will enable you to start Mail ok.
    Then from the Mail menus - choose Mailbox-Erase Junk Mail . The problem mail should now be in the trash. If there's nothing you want to retain from the Trash, you should now choose Mailbox- Erase Deleted Messages....
    If you need to double-check the Trash for anything you might want to retain, then view the Trash folder first, before using Erase Junk Mail & move anything you wish to keep to another folder.
    The shift key starts Mail in a sort of Safe mode.

  • IPhone 3G 8GB Crashes when syncing with iTunes. URGENT HELP NEEDED.

    I have latest iTunes and OS on my iPhone 3G...
    Every time i plug my iPhone in it begins to sync and then iTunes will freeze and not respond..
    I have tried re installing iTunes.. I can't reset my iPhone as i can't create a backup..
    URGENT HELP NEEDED PLEASE!

    I don't have an iphone, but if it's anything like my click-wheel ipod, a reset doesn't delete anything.
    It just resets the ipod's operating system, kind of like a PC restart. Did you try this Sleep/Wake button thing mentioned here?
    http://support.apple.com/kb/HT1737
    Maybe it's a podcast of voice memo causing the problem like it did for this person
    http://discussions.apple.com/message.jspa?messageID=10907809#10907809
    That's all I got. You might have better luck on an iPhone forum. Everyone there would probably have one. Like I said, I don't.

  • IPhone 4 reset itself, photos lost -URGENT HELP NEEDED

    Hi there,
    Urgent help needed!!
    Tonight I was taking extremely important photos throughout an event on my iPhone 4, however, my iPhone 4 ran out of battery once I was near a charger I plugged it in and for some reason my iPhone had reset itself. Back up icloud options were from yesterday, but the photos that I was taking at the event are needed urgently. Is there any way possible I can recover the photos that were taken?
    Thanks in advance!!!!

    Slymm71 wrote:
    just had similar problem got email from find my phone saying initiating full phone wipe this cannot be stopped ***? i own the phone from new and registerred in m name but wiped whilst i was using it !!!
    See your other post... 
    https://discussions.apple.com/message/18876037#18876037

  • Computer restarts when ipod is connected urgent help needed

    alright this is weird, I've had my ipod for ages and suddenly I go to plug it in and the computer slows down really really really slow and eventually just turns it self off, restarts and then sits in a black screen. if I leave the ipod plugged into the computer and restart it again it just goes straight back to the black screen, but both my ipod and computer work fine when there not connected. i have the latest version of itunes which seemed to help the first time i tried it actually started to update the ipod but then guess what the computer has another heart attack. urgent help needed please!!!

    if I leave the ipod plugged into the computer and restart it again it just goes straight back to the black screen
    Given this, I'd put it down to a flaky power supply in the computer. Might want to try using another computer or replacing the PSU.

  • User Exit for Material Group...Urgent help needed

    Does anybody have an idea of which user exit can be used to capture the changes made to material group in MM02(Material)..... Urgent help needed...

    See  the below user exit and this will trigger under MM01,MM02 and MM17 Transaction
    Enhancement name : MGA00001
    Function module :EXIT_SAPLMGMU_001
    Include : ZXMG0U02
    Reward Points if it is helpful.
    Thanks
    Seshu

  • Data uload to ODS ending up with an error. URGENT HELP NEEDED!!!!!!

    Hi
    My Sceniro is Full load from ODS1 to 5 other ODS. Iam uploading the data to other 5 ODS by selecting 1 ODS at a time.
    Problem i am facing is upload is ending up with error mesg. Error Mesg are
    <b>Error 8 when starting the extraction program - R3019
    Error in Source System - RSM340
    Req xxx in ODS2 must have QM ststus green before it is activated - RSM1110</b>
    I have seen the the OSS notes for given error no, but they are not applicable to me. what could be the other possible solution.
    In detail tab of the monitor i see red light at Extraction step and Subseq. processing.
    Its quite urgent bcoz this error is occuring in Production system.
    Plzzzz urgent help needed.
    Thanks
    Rohini
    Message was edited by: Rohini Garg

    rohini,
    go to RSA1->Modeling->Source Systems and right-click on your BW system, and click on 'Replicate Datasources'.
    also, go to the ODS that's causing the problem (via RSA1->InfoProvider and go to your ODS), right click and click on 'Generate Export Datasource'.
    one more thing, make sure that all your record/s in the source ODS is active. if you're not sure manage its contents and click on 'Activate'. if there are any entries in the the next screen that comes up, you need to activate it first, then try everything again.
    let me know what happens. also try to look for error messages in ST22 and SM21 that may be related to this and post whatever possible error you see there here.
    ryan.

  • Problem uninstalling MaxMSPRuntime on mac - urgent help needed

    Hello there,
    I've been using Cycle 74's MaxMSP Runtime version 5.1 for a while but recently had to witch to an earlier version to make some hardware function along side the Max runtime environment. The problem is that where i would usually just drag and drop Max 5.1 into the trash to uninstall it, for some reason, after i have done this and try to install the older version of Max, OSX wont let me install Max 4.0.8 as it says an updated version is currently installed. I have scoured my hard drive for the remanence of Max 5.1. and deleted everything i've found. Is there a way of overriding macosx and getting it to replace Max5.1 with an older version?
    Urgent help needed as i am playing a show this weekend and currently am not able to get my equipment to function.
    A shiny nickel for the one who saves my ***.
    Thanks
    Henry

    Hi- Try this...
    If you can, reinstall or use time machine to recover your recently deleted MaxMSP Runtime 5.1.
    Then, download AppZapper. It is a utility that helps you cleanly delete programs off your mac. It is free for the first 5 uses.
    http://appzapper.com/
    Then, install AppZapper, and then go ahead and drag the MaxMSP Runtime 5.1 into it, and it should hopefully get rid of the pesky program

  • Recovering windows XP -Urgent help needed

    I am new to Toshiba. I hav a 60 GB hard disk with no partition and windows XP home installed. I want to partition the hard disk now. Now after formatting the hard disk do i lose Windows XP HE completely or is there chance to recover it and reinstall it. Urgent help needed.

    Hi
    You can reinstall your notebook using Recovery CD. It is easiest and fastest way to reinstall OS, all necessary drivers and tools. Put Recovery CD into DVD-ROM, start notebook and press down C button. At the beginning there is choice between two kinds of installation (Standard mode and expert mode).
    If you choose the first one whole HDD will be formatted and used for OS installation. With second one (expert mode) it is possible to install OS on first partition. It is also possible to define how big the partition should be.
    Try it. It is very simple to do it.
    Good luck

  • PYTHAGORAS THEOREM __ URGENT HELP  NEEDED

    Hi everyone - I am developing various proofs of the pythagora's theorem
    and the following code draws a triangle on screen and the proof follows -
    but i need to know how to drag the triangle such tht 1 angle is always set to 90 degrees.
    i.e. i need to resize the triangle by dragging its vertex points by which the1 angle remains at 90 no matter what the size.
    The proof has got some graphics code hardcoded in it - i.e. LINES AND POLYGONS have been hardcoded
    i need to reconfigure that such that everytime the user increases the size of the triagnle and clicks on next it draws the lines and polygons in the correct area and place
    PLEASE HELP
    the code is as follows
    MAIN CLASS
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import javax.swing.*;
    public class TestProof {
        TestControl control;          // the controls for the visual proof
        TestView view;          // the drawing area to display proof
        // called upon class creation
        public TestProof() {
            view = new TestView();
    view.setBackground(Color.WHITE);
            control = new TestControl(view);
            Frame f = new Frame("Pythagoras");
            f.add(view,"Center");
            f.add(control,"South");
            f.setSize(600,600);
            f.setBackground(Color.lightGray);
            f.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                public void mouseMoved(MouseEvent e) {
                    System.out.println("Mouse  " + e.getX() +","  + e.getY());
                public void mouseDragged(MouseEvent e) {
                    System.out.println("Draggg: x=" + e.getX() + "; y=" + e.getY());
            JMenu File = new JMenu("File");
            JMenuItem Exit = new JMenuItem("Exit");
            Exit.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    ExitActionPerformed(evt);
            JMenuBar menuBar = new JMenuBar();
            menuBar.add(File);
       File.add(Exit);
            f.add(menuBar,"North");
            f.show();
        private JMenuBar getMenuBar() {
            JMenu File = new JMenu("File");
            JMenuItem Exit = new JMenuItem("Exit");
            Exit.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    ExitActionPerformed(evt);
            JMenuBar menuBar = new JMenuBar();
            menuBar.add(File);
                 File.add(Exit);   
            return menuBar;
        private void ExitActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:
            System.exit(0);
        // for standalone use
        public static void main(String args[]) {
      TestProof TP = new TestProof();
    }Test VIEW
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.text.*;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class TestView extends Canvas {
        int TRANSLUCENT = 1;
        int sequence;          // sequencer that determines what should be drawn
        // notes matter
        int noteX = 100;     // note coordinates
        int noteY = 60;
        int fontSize = 11;     // font size
        int lineSpacing     // space between two consecutive lines
        = fontSize + 2;
        Font noteFaceFont;     // font used to display notes
        // objects matter
        Polygon tri;          // right-angled triangle with sides A, B, and C
        Polygon tri1;
        Polygon sqrA;          // square with side of length A
        Polygon sqrB;          // square with side of length B
        Polygon sqrC;          // square with side of length C
        Polygon parA;          // parallelogram of base A and height A
        Polygon parB;          // parallelogram of base B and height B
        Polygon poly1;
        Polygon poly2;
        Polygon poly3;
        Polygon poly4;
        Polygon poly5;
        Polygon poly6;
        int X0 = 350;          // coordinates of triangle
        int Y0 = 350;
        int A = 90;//60;          // triangle size
        int B = 120;//80;
        int C = 150;//100;
        //CORDS of 2nd triangle
        int X1 = 350;
        int Y1 = 500;
        // notes: three lines per note
        String notes[] = {
            // note 0
            // note 1
            // note 2
            // note 3
            // note 4
            // note 5
            // note 6
            // note 7
            // note 8
            // note 9
            // note 10
            // note 11
            // note 12
            // note 13
            // note 14
        // constructor
        public TestView() {
            addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                public void mouseMoved(MouseEvent e) {
                    System.out.println("Mouse  " + e.getX() +","  + e.getY());
                public void mouseDragged(MouseEvent e) {
                    System.out.println("Draggg: x=" + e.getX() + "; y=" + e.getY());
            // set font
            noteFaceFont = new Font("TimesRoman", Font.PLAIN, fontSize);
            // (coordinates specified w.r.t. to P0, unless otherwise specified)
            // create the triangle
            tri = new Polygon();
            tri.addPoint(0, 0);                    // add P0 coordinate
            tri.addPoint(A*A/C, -A*B/C);          // add A3 coordinate
            tri.addPoint(C, 0);                    // add C1 coordinate
            tri.translate(X0, Y0);               // place triangle
            tri1 = new Polygon();
            tri1.addPoint(0,0);                    // add P0 coordinate
            tri1.addPoint(A*A/C +38, +A*B/C);          // add A3 coordinate
            tri1.addPoint(C, 0);                    // add C1 coordinate
            tri1.translate(X1, Y1);
            // create square of side A
            sqrA = new Polygon();
            sqrA.addPoint(0, 0);               // add P0 coordinate
            sqrA.addPoint(-A*B/C, -A*A/C);          // add A1 coordinate
            sqrA.addPoint(-A*(B-A)/C, -A*(A+B)/C);     // add A2 coordinate
            sqrA.addPoint(A*A/C, -A*B/C);          // add A3 coordinate
            sqrA.translate(X0, Y0);               // place square
            // create square of side B
            // warning: the coordinate of this object are specified relative to C1
            sqrB = new Polygon();
            sqrB.addPoint(0, 0);               // add C1 coordinate
            sqrB.addPoint(B*A/C, -B*B/C);          // add B1 coordinate
            sqrB.addPoint(B*(A-B)/C, -B*(A+B)/C);     // add B2 coordinate
            sqrB.addPoint(-B*B/C, -B*A/C);          // add A3 coordinate
            sqrB.translate(X0 + C, Y0);               // place square
            // create square of side C
            sqrC = new Polygon();
            sqrC.addPoint(0, 0);               // add P0 coordinate
            sqrC.addPoint(C, 0);               // add C1 coordinate
            sqrC.addPoint(C, C);               // add C2 coordinate
            sqrC.addPoint(0, C);               // add C3 coordinate
            sqrC.translate(X0, Y0);               // place square
            poly1 = new Polygon();
            poly1.addPoint(405,279);
            poly1.addPoint(413,350);
            poly1.addPoint(432,500);
            poly1.addPoint(442,571);
            poly1.addPoint(500,500);
            poly1.addPoint(500,350);
            poly2 = new Polygon();
            poly2.addPoint(279,297);
            poly2.addPoint(404,280);
            poly2.addPoint(571,254);
            poly2.addPoint(500,350);
            poly2.addPoint(350,350);
            //Polygon 3
            poly3 = new Polygon();
            poly3.addPoint(404,280);
            poly3.addPoint(350,350);
            poly3.addPoint(414,350);
            poly4 = new Polygon();
            poly4.addPoint(350,350);
            poly4.addPoint(350,500);
            poly4.addPoint(442,572);
            poly4.addPoint(433,500);
            poly4.addPoint(414,350);
            poly5 = new Polygon();
            poly5.addPoint(476,183);
            poly5.addPoint(332,225);
            poly5.addPoint(278,295);
            poly5.addPoint(404,279);
            poly5.addPoint(571,254);
            poly6= new Polygon();
            poly6.addPoint(405,278);
            poly6.addPoint(332,224);
            poly6.addPoint(476,182);
            // create parallelogram of height A
            parA = new Polygon();
            parA.addPoint(0, 0);               // add P0 coordinate
            parA.addPoint(0, C);               // add C3 coordinate
            parA.addPoint(A*A/C, C - A*B/C);          // add Q0 coordinate
            parA.addPoint(A*A/C, -A*B/C);          // add A3 coordinate
            parA.translate(X0,Y0);               // place parallelogram
            // create parallelogram of height B
            // warning: the coordinate of this object are specified from C1
            parB = new Polygon();
            parB.addPoint(0, 0);               // add C1 coordinate
            parB.addPoint(-B*B/C, -B*A/C);          // add A3 coordinate
            parB.addPoint(A*A/C - C, C - A*B/C);     // add Q0 coordinate
            parB.addPoint(0, C);               // add C2 coordinate
            parB.translate(X0 + C, Y0);
            // place parallelogram
        // depending on the sequence number we draw certain objects
        public void paint(Graphics gfx) {
            super.paint(gfx);
            Graphics2D g = (Graphics2D) gfx;
            g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
            // text first, then objects (and animation)
            // we always output some notes
            g.drawString(notes[3*sequence], noteX, noteY);
            g.drawString(notes[3*sequence + 1], noteX, noteY + lineSpacing);
            g.drawString(notes[3*sequence + 2], noteX, noteY + 2*lineSpacing);
            // the object are drawn in an order so that they are properly overlapped
            if(sequence == 13) {
                g.setColor(Color.green);
                g.fillPolygon(poly1);
                g.fillPolygon(poly2);
                g.fillPolygon(poly3);
                g.fillPolygon(poly4);
                g.fillPolygon(poly5);
                g.setColor(Color.RED);
                g.setColor(Color.GREEN);
                g.drawLine(413,351,433,499);
                g.setColor(Color.white);
                g.fillPolygon(tri);
                g.fillPolygon(tri1);
                g.fillPolygon(poly6);
            if(sequence == 12 ) {
                g.setColor(Color.green);
                g.fillPolygon(poly1);
                g.fillPolygon(poly2);
                g.fillPolygon(poly3);
                g.fillPolygon(poly4);
                g.fillPolygon(poly5);
                g.setColor(Color.BLACK);
            if(sequence == 11){
                g.setColor(Color.green);
                g.fillPolygon(poly1);
                g.fillPolygon(poly3);
                g.fillPolygon(poly4);
                g.setColor(Color.BLACK);
            if(sequence == 8 ){
                g.setColor(Color.green);
                g.fillPolygon(poly5);
                g.setColor(Color.MAGENTA);
                g.drawString("E",578,254);
                g.drawString("D",268,302);
                g.setColor(Color.black);
                g.drawArc(250,150,350,250,320,65);
            else if (sequence == 9 ){
                g.setColor(Color.green);
                g.fillPolygon(poly2);
                g.setColor(Color.MAGENTA);
                g.drawString("E",578,254);
                g.drawString("D",268,302);
                g.setColor(Color.black);
                g.drawArc(250,150,350,250,320,65);
            if( sequence == 10){
                g.setColor(Color.green);
                g.fillPolygon(poly2);
                g.fillPolygon(poly5);
                g.setColor(Color.black);
                g.setColor(Color.MAGENTA);
                g.drawString("E",578,254);
                g.drawString("D",268,302);
                g.setColor(Color.black);
                g.drawArc(250,150,350,250,320,65);
            if(sequence == 7){
                g.setColor(Color.green);
                g.fillPolygon(poly2);
                g.setColor(Color.MAGENTA);
                g.drawString("E",578,254);
                g.drawString("D",268,302);
                g.setColor(Color.black);
            if(sequence == 6){
                g.setColor(Color.yellow);
                g.fillPolygon(poly2);
                g.setColor(Color.green);
                g.fillPolygon(poly3);
                g.setColor(Color.blue);
                g.fillPolygon(poly4);
                g.setColor(Color.black);
                g.drawArc(250,175,350,275,300,65);
                //g.drawArc(250,150,350,250,320,65);
                g.drawLine( 606,309,599,299);
                g.drawLine(592,313, 599,299);
                g.drawString("+90 degrees",605,378);
            if (sequence == 5 ) {
                g.setColor(Color.yellow);
                g.fillPolygon(poly2);
                g.setColor(Color.black);
            if (sequence == 4) {
                g.setColor(Color.YELLOW);
                g.fillPolygon(poly1);
                g.setColor(Color.black);
                g.drawArc(319,310,250,195,89,-35);
                g.drawLine(499,319, 492,312);
                g.drawLine(499,319, 492,325);
                g.drawArc(200,180, 233,238,-120,-60);
                g.drawLine(200,298, 208,309);
                g.drawLine(200,298, 194,313);
                g.drawString("-90 degrees",227,347);
            if (sequence >= 3) {
                g.drawLine(404,279,442,572);
            // draw the squares
            if (sequence >= 2) {
                g.drawLine(278,296,572,254);
            // draw the squares
            if (sequence >= 1) {
                g.drawLine(333,224,476,182);
                g.drawPolygon(tri1);
            // always draw the triangle
            g.drawPolygon(tri);
            g.drawPolygon(sqrA);
            g.drawPolygon(sqrB);
            g.drawPolygon(sqrC);
            g.setColor(Color.MAGENTA);
            g.drawString("C", X0 + C/2 - fontSize/2, Y0 + lineSpacing);
            g.drawString("A",
            X0 + A*A/(2*C) - fontSize*A/B/2,
            Y0 - A*B/(2*C) - lineSpacing*A/B);
            g.drawString("B",
            X0 + C - B*B/(2*C) - fontSize*A/B/2,// the last "-" isn't log.
            Y0 - B*A/(2*C) - lineSpacing*A/B);
        public void redraw(int sequence) {
            this.sequence = sequence;
            repaint();
    }TEST CONTROL
    * TestControl.java
    * Created on 28 February 2005, 11:16
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import javax.swing.JFrame;
    * @author  Kripa Bhojwani
    public class TestControl extends Panel implements ActionListener {
      TestView view;
      int sequence;                    // event sequence
      // constructor
      public TestControl(TestView view) {
        Button b = null;
        Label label = new Label("A^2 ");
        this.view = view;          // initialize drawble area
        sequence = 0;               // initialize sequence
        b = new Button("Prev");
        b.addActionListener(this);
        add(b);
        b = new Button("Next");
        b.addActionListener(this);
        add(b);
        add(label);
      // exported method
      public void actionPerformed(ActionEvent ev) {
        String label = ev.getActionCommand();
        if (label.equals("Prev")) {
          if (sequence >0) {
         --sequence;
        else {
          if (sequence < 15) {
         ++sequence;
        this.setEnabled(false);          // disable the controls
        view.redraw(sequence);
        this.setEnabled(true);          // enable the controls
    }Please help --- really need to sort this out...
    THANKS

    Can any one help me with this --
    basically need to draw a triangle with BC as the Base and the HYPOTENUSE of a right angle triangle right angled at A...
    [    code]
    A
    B/-----------------------------/C
    So angle A should be 90 degrees
    and the user should be able to Drag sides B and C anywhere on screen
    PLEASE HELP

Maybe you are looking for

  • How to handle iTunes Match with multiple libraries (one account, 5 family members)?

    How would this work, in the situation below ... Everyone has their own iCloud account (for their own syncing purposes). But we (family) ALL share the same iTunes account (for purchasing). How will this work, since we all have our own iTunes libraries

  • IPod touch 3g will not wifi sync... why?

    I recently updated to iOS5, not without its hassles, I might add. I now have 2 major problems. The first one is whatever I do, I cannot wirelessly sync my iPod touch 3g... even though I've reinstalled iTunes (verison 10.5.0.142) and Bonjour too... an

  • Stage resizing

    Hi everyone. I'm trying to create a photo gallery where an image gets loaded from an xml file and I want the stage to resize to the size of the image because the images are all going to be different sizes. I've looked into the Stage class, but I coul

  • Cannot connect to service provider. error (2)

    What I am facing right now, it always prompt me this error message "Cannot connect to the provider. Make sure it is running in the specified host/port. Error(2)." it is in version 9.3.1.2. this error i got when i try to connect any application throug

  • Domain Suffix Deleted

    We have an unusual problem where that one of our domain suffix's gets deleted every 30 days, we have the same domain suffix name in two separate forests but wouldn't have thought it would have caused the deletion. We are also using ADFS and have the