Java project!Coloured checkered boxes!

Guys I need your help...It's for my school project...I'm still only a beginner in java programming...I've gotta create a java applet concerning area..It has to display a rectangle containing alternate squares of different colours which is determined by a scrollbar which customizes the size of the rectangle..For example if the scrollbar is adjusted to a 4*4 the area is 16 and so there has to be 16 squares of different colours..And what is shown by the scrollbar needs to be reflected on textfields as well..Please help me out...This should simple to you guys as you're the experts here.

What's your problem?

Similar Messages

  • I m not able to create xml file in Java Project

    hi all,
    I have created one java project just to try with Ant Builder. I have created one class inside it. and now i m creating an XML file inside that project.
    But as soon as i try to create the File -> New -> File and give the .xml extention of the file this gives error into the project.
    Will you suggest me the solution for that?
    Thanks in advance.

    Assuming that you are facing this problem in NDS, here is the solution.
    Go to Windows--> Preferences --> WorkBench -->File Associations
    In the File Types list select *.xml
    This will display the default associated XML editor as
    XML Editor(default) in the bottom list box.
    Click on add button near the bottom list box and select Text Editor, click Ok.You will see one more entry in the list box as "Text Editor".
    Select this entry and click on the default button.
    Click Ok and close the preferences dialogue.
    Now create a new xml file.You wont see the error this time.
    Please note that this will treat all simple xml files you will create as TEXT Files and always open with Text Editor.You can override this behaviour with right click on the file and select appropriate editor from the "Open With" context menu.
    The error you are talking about is because the XML editor tries to check well-formedness and basic syntax rules for the file that you newly created, actually is a noce feature of the IDE.
    Rgds,
    Amol

  • How to add Java projects to FlexBuilder2?

    In a recent
    Breezinar about
    Flex Data Services James Ward demonstrated how to to debug a
    Flex2/Java application by simultaneously setting breakpoints in
    both the ActionScript client and in the Java server from within the
    same instance of Flex Builder 2. The out-of-the-box FlexBuilder2
    doesn't have a Java project type. Anyone know how to add Java
    support to FlexBuilder2 to support the Java+ActionScript
    development environment demonstrated by James in his Breezinar
    ?

    When installing Flex Builder, select the option to install
    the Eclipse plugin
    version instead of the standalone version. The standalone
    version can only
    work with Flex projects, but the Eclipse plugin version
    *adds* Flex to
    whatever your existing Eclipse installation has (typically
    Java).
    A screenshot of what I'm talking about:
    http://www.morearty.com/blog/wp-content/uploads/2006/05/installer.png
    Mike Morearty
    Developer, Flex Builder team
    http://www.morearty.com/blog

  • A strange java project transplantation problem

    I am writing a java project using eclipse to crawl webpages.
    After I got everyting about the project well on my machine,
    I try to transplant it to the server(also Windows XP OS) which
    uses the same JDK(jdk1.6.0_05) and development tool(eclipse).
    However to my surprise on the server side eclipse hints there are syntactial errors.
    And the errors seem very puzzling.
            Long currentTime=new Long(getCurrentTime());
    Thread.sleep(1000); //Time to wait  
    Long launchTime=new Long(getCurrentTime());
    while(true)
            currentTime=Long.parseLong(getCurrentTime());
            if(currentTime>launchTime)
    private static String getCurrentTime()
    return new SimpleDateFormat("yyyyMMddHHmmss").format(new Date(System.currentTimeMillis()));
    }for
    currentTime=Long.parseLong(getCurrentTime());it hints
    Type mismatch: Can not convert Long to Long.However getCurrentTime() retruns String
    for
    if(currentTime>launchTime)it hints
    The operator > is undefined for the argument type(s) java.lang.Long, java.lang.LongTo me, it's quite strange.
    What's wrong with it?
    Thanks!

    First I must say sorry for my late thanks to your above guys' enthusiastic helps and replies.
    I have an outing last 2 days and it causes me unable to view this thread timely.
    Thank evilknightthk. Your modified codes work. But I missed another error in my last reply.
    That is
    ArrayList<String> threadCluster=new ArrayList<String>();It also hints error:
    for ArrayList
    The type ArrayList is not generic; it can not be parameterized with arguments with <String>.for <String>
    Syntax error, parameterized types are only available if source level is 5.0I checked the auto(un)boxing from the window-->preferences-->...
    But seems it doesn't help, error are still there.
    Thanks again for your guys. You all are very kind. :-)

  • Retrieve all values from project type when project type combo box is null

    Hi,
    We are facing a tight situation here. We have a scenario where we have 2 filter options.
    1) Department ID
    2) Project type
    When department ID is selected all the department IDs should be populated in the combo box and the project type combo box should be empty.
    Similarly, when project type is selected all the project types should be populated in the combo box and the department ID combo box should be empty.
    Then, when more than one value is selected from department ID box and all the values from project type must be retrieved from query level (as per business logic).
    How do we do this? Kindly help us with this situation.

    Basically my situation slightly different.
    I am trying to do a bulk insert on SQL Server table using prepared statement, during that time i am getting the exception. I am using JDBC-ODBC driver. However, if i do individual record insertion, it is working.
    Any idea about this type of problem ?
    Regards
    Ramesh

  • How to use BO SDK in local java project?

    Hi,
    I am trying to connect BO system using below mentioned code
    public void main(String args[]) throws SDKException {
         try
              System.out.println("main");
              /ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();/
              IEnterpriseSession boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( "Administrator","","BOSAP","secEnterprise");
              IInfoStore boInfoStore =(IInfoStore) boEnterpriseSession.getService("InfoStore");
              ChangePWD(boEnterpriseSession, boInfoStore);
         }catch(Exception e)
              System.out.println("Exceptions in main");
              System.out.println(e);
    This code was taken from below mentioned thread:
    Force all users to change their Enterprise passwords with a batch operation
    I have created standalone java project and running as JAVA application in eclipce. I am getting class def not found error for these BO SDK jar files. I have added
    cecore.jar
    celib.jar and
    cesession.jar files as external lib to java project
    I am using following imports
    import com.crystaldecisions.sdk.framework.CrystalEnterprise;
    import com.crystaldecisions.sdk.framework.IEnterpriseSession;
    import com.crystaldecisions.sdk.exception.SDKException;
    import com.crystaldecisions.sdk.occa.infostore.*;
    import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
    import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
    import com.crystaldecisions.sdk.plugin.desktop.user.IUser;
    Does any one know solution to fix class def not found error?
    Thanks
    Nitesh Shelar

    I did some mistake few dependent jars were missing in project build path. After adding those missing BO jar files. Now its giving server connection error. Which I am trying to resolve.
    Thanks for your help.
    Nitesh Shelar

  • Is it possible to change the colour of box in script from black to blue

    Hi,
    Is it possible to change the colour of box in script from black to blue  or some other colour and background colour also...if so how....
    Thanks.

    No..
    It is not possible in scripts..
    In scripts u cannot use colors..
    In smartforms u can do that..
    reward if it helps u..
    sai ramesh

  • [ot] A UML tool for a new Java project

    I am working on the new Java project and need a UML tool to get it start. I am wondering whether anyone one can recommend such tool or not. It can be either stand alone or as an Eclipse plug-in. It shall be able to handle at least 50 classes.
    Thanks.

    Is it any good? I haven't tried it but we're
    evaluating UML tools here and it's on my list to play
    with.
    PS.If you mean SDE....
    I have only used the personal edition at home, and the other versions have more functionality available
    My impressions, FWIW, are
    - easier to use than rational rose (I find this one which I have to use at work to be a pain), although, paradoxically enough, they are not that dissimilar in appearance
    - I was able to create some reasonably complex models without any problems
    - easy to install and start using - no great learning curve
    - I tried importing a model I had exported from rose and that did not work very well at all.
    - this applies to version 2.2

  • Best Practices for Defining NDS Java Projects...

    We are doing a Proof of Concept on using NDS to develop non-SAP Java applications.  We are attempting to determine if we can replace our current Java development tools with NDS/WAS.
    We are struggling with SAP's terminology and "plumbing" for setting up/defining Java projects.  For example, what is and when do you define Tracks, Software Components, Development Components, etc.  All of these terms are totally foreign to us and do not relate to our current Java environment (at least not that we can see).  We are also struggling with how the DTR and activities tie in to those components.
    If any one has defined best practices for setting up Java projects or has struggled with and overcome these same issues, please provide us with some guidance.  This is a very frustrating and time-consuming issue for us.
    Thank you!!

    Hi Peggy,
    In Component Model we divide software projects into small components.Components can use other components in well defined manner.
    A development object is a part of a component that can be changed or developed in some way; it provides the component with a certain part of its functionality. A development object may be a Java class, a Web Dynpro view, a table definition, a JSP page, and so on. Development objects are always stored as “sources” in a repository.
    A development component can be defined as a frame shared by a number of objects, which are part of the software.
    Software components combine components (DCs) to larger units for delivery and deployment.
    A track comprises configurations and runtime systems required for developing software component versions.It ensures stable states of deliverables used by subsequent tracks.
    The Design Time Repository is for versioning source code management. Distributed development of software in teams. Transport and replication of sources.
    You can also find lot of support in SDN for the above concepts with tutorials.
    Refer this Link for a overview on Java development Infrastructure(JDI)
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/java development infrastructure jdi overview.pdf
    To understand further
    Working with Net Weaver Development Infrastructure :
    http://help.sap.com/saphelp_nw04/helpdata/en/03/f6bc3d42f46c33e10000000a11405a/content.htm
    In the above link you can find all the concepts clearly explained.You can also find the required tutorials for development.
    Regards,
    Vijith

  • How to run a java project based on x86 Windows XP on Windows CE?

    I am a freshbird of J2ME and i am very confused these days.I beg you can look this topic thoughout.
    I used to configurate a Java Project File about SIP&VOIP successfully,and I can run it well on my PC .
    Now I want to migrate the project to a Mobile OS,and problems comes.
    I have installed the Windows CE 5.0 Evalution Edition on my machine(Windows XP SP2) and it works fine.I search it online for days ,and I download almost all related including CLDC(j2me_cldc-1_1-fcs-src-winunix.zip),MIDP(midp-2_0-fr-spec.zip<==Maybe this is not the right one beacuse it don't have a bin folder),and J2ME Wireless Tool KIt(j2me_wireless_toolkit-2_2-ml-windows.exe).
    I have configrate the enviroment-variable already , but I don't kown what to do next . Do you kown? I would be very thankfull.

    You need to completely rewrite the app to use the mobile APIs as they're very different from the PC ones, I suppose.

  • How to create the exe file for java project.

    How to create the exe file for java project.
    am done the project in java swing , i like to create the project in exe format, so any one help for me,
    send the procedure for that.
    thanking u.

    How to create the exe file for java project.Have you ever heard of google? I pasted your exact "question" into a google search:
    http://www.google.com/search?q=How+to+create+the+exe+file+for+java+project.
    and got several useful links.
    Better search terms might yield even better results.
    Sheesh.

  • Getting an error in Java Project in SAP NetWeaver Developer Studio

    Hi,
    I am getting this error in my Java Project developed in SAP NetWeaver Developer Studio.
    Exception occurred during launch Reason: Source locator does not exist org.eclipse.jdt.debug.ui.javaSourceLocator
    Is this problem of not defining some External .jar file or problem with Eclipse?
    I am developing Java Project which connects with SAP Master Data Management.
    I am referring to a PDF named "How To identify identical master data records using SAP MDM 5.5
    Java APIu2019s".
    Regards
    Kaushik Banerjee

    This may be because of the metadata(registry) cache when it was written out by a second instance of NWDS.
    So the plug-in appears in the file system but NWDS doesn't see it in the metadata
    Delete the .metadata file from your workspace and then start up NWDS. It might work.
    Regards,
    PG
    Edited by: PG on Dec 16, 2008 3:18 PM

  • [Urgent] using javafx object in java project

    Suppose I here created a very simple java project and the main file is like below,
    public class test {
        public static void main(String[] args){
                System.out.println("Hello World!");
    }and in this particular java project, I need to use another javafx object which is defined as (the javafx and java file are in the same package),
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Circle;
    var stage: Stage = Stage {
        title: "Declaring Is Easy!"
        scene: Scene {
            width: 300
            height: 250
            content: [
                Circle {
                    centerX: 150  centerY: 120 radius: 80
                    fill: Color.MAROON
                    stroke: Color.INDIANRED
                    strokeWidth: 10.0
                }, //Circle
                Rectangle {
                    x: 25, y: 80 width: 250, height: 80
                    arcWidth: 20 arcHeight: 20
                    fill: Color.web("#6699ff")
                    stroke: Color.web("#003399")
              strokeWidth: 5.0
                } //Rectangle
            ] //Content
        } //Scene
    } //StageSo how could I achieve this?
    Regards.

    Thanks for your reply.
    But would you please elaborate on this sentence: create the fx class using Class.forName("....").newInstance()?
    Indeed I implemented an interface which was extended by the javafx class, and in the main java file I need to write following codes to use this object,
    Context context = FXLocal.getContext();
            FXClassType instance = context.findClass("packageName.JavaFXClass");
            ObjectValue obj = (ObjectValue)instance.newInstance();
            JavaInterface ji = (JavaInterface)obj.asObject();The problem that I encountered right now is, the exception was thrown at context.findClass("javatest.MyChart");, since it's not able for the compiler to find the JavaFXClass.class.
    I checked the folder build\classes\packageName and noticed that both my main JavaClass and JavaInterface have been compiled with .class file, while the JavaFXClass was not, which means the file JavaFXClass.class doesn't exist.
    What's the solution?

  • How to open java files in a java project

    hi ,
    i have to implement a java program analyzer and now i have implement a java parser using javaCC. My parser parse a java file at a time and i have to read and parse all java files in a java project. my idea is to enter
    java project name *.jpx as an input and search java files in project and parse them one by one, or , to enter the folder path of java source files of project and parse them.
    i am a beginer of java language and i don't know where to start to do it.
    is there someone tell me which way is easier and better for my case and some ways to implement it. i search sample files that is similar to my case but i cannot find any.
    thanks in advance.
    ami

    if u don't mind , can u tell me which tutorial i
    should read for that? http://java.sun.com/docs/books/tutorial/essential/io/
    This... for example.
    xH4x0r

  • PS CS6 - How do I get colour picker to show the colour difference between new & current in the colour preview box?

    In previous versions, I would click the on the colour selection boxes (tool bar) and the colour difference would show in the Colour Picker box. The selected colour (new or current) would show. The target circle would physically move around.  Now all the colour number change, but the colour target doesn't move.  I used to colour correct items by checking how close using the colour picker and rapidly switching back & forth.  Now I can't do that. Help!

    In a nutshell, you have to simplify the frame layer and erase the interior.
    Here are the steps:
    Create your background.
    Add a new layer:
    Drag the frame you want to use onto the editing surface.  The frame will come in on its own layer:
    Simplify that frame layer:
    Choose the Magic Wand Tool and give it these settings:
    Click on the interior gray area of the frame with the Magic Wand to select it, and hit your Delete key:
    Switch to the Eraser Tool and erase the stuff that's left in the middle:
    Select the empty layer (Layer 1 in this example) and use File...Place to place your image on it.  The layer name will change to the name of the image.  Adjust the size and placement of the image.  Your layers will now look like this:
    With the frame layer selected, add a Hue/Saturation adjustment layer, making sure to "clip" it to the frame layer.  Adjust the sliders to suit:
    The final result:
    Ken
    P.S.,  Nothing says "Christmas" like laundry and red leopard fur! 

Maybe you are looking for

  • Printer Problem In Oracle Forms And Reports server

    Hi, I am facing a problem regarding installation of printer drivers in my Reports Server (10.1.2.0.2 on Windows 2003). Unless the printer driver is installed locally on the Report Server Reports are not printing. The problem is with the USB printers

  • IMac DV/400 will not read CD's since I installed Panther

    Hi, A customer's iMac DV/400 with 384 MB RAM was running OS 9.2.2. We decided to upgrade his OS to 10.3 (firmware was already up to date 4.19) After the first CD finished and it restarted and asked for disk 2, it would no longer read ANY CD's. In fac

  • Text boxes are not editable?

    Why is it that some text boxes are not editable? can't find were to change it? it can be the same tex tbox that is editable in one file copied to another and there is not editable...

  • Java code to reset UNIX password

    Hi I need to reset a password of remote UNIX machine through java. Please give me clues/commands by which i can implement this . If you have any info about command interfaces that unix gives on some ports for resetting by connecting through a socket

  • Reading all function code of a pf-status

    Hi, I need to read all the function code of a pf-status. Any idea if there's any table or function module to do that?