Search Result

Collapse
241 results in 0.0080 seconds.
Keywords
Members
Tags
java
  •  

  • Matthewborg
    started a topic Problem displaying JPanel in JApplet
    in Java

    Problem displaying JPanel in JApplet

    I am doing an assignment which it consists of an Applet, where the user has to insert several values and the program has to draw a quadratic graph.

    In my applet I want to display the graph in the border layout center and one control panel to the east side and another control panel to the south side.

    For now both the control panels are the same, until I manage to make my applet display them I am not willing to waste time...
    See more | Go to post

  • I have a JApplet which has to display 3 Components. (2 JPanels and 1 Paint Method)

    I have an assignment in which I have to allow a user to plot a graph using a quadratic equation.

    I managed to draw the skeleton of the graph, and now I am trying to display the "control panel" for the user to input the values.

    I have 4 files:

    graph.java
    panel.java
    panelB.java
    panelC.java
    My problem is when I run the code it is displaying only the panel.java even in...
    See more | Go to post

  • mathgeek314
    started a topic Why won't my doubles hold their decimals?
    in Java

    Why won't my doubles hold their decimals?

    I am trying to write a program to create boundaries for a polygon on a two-dimensional coordinate plane. Here is my code:

    Code:
    public class Example {
    public Example()
        {
            for (int y = 0; y < game1.o.l; y++)
            {
                System.out.println("( "+game1.o.bind[0][y]+", "+game1.o.bind[1][y]+" ) -> ( "+game1.o.bind[2][y]+", "+game1.o.bind[3][y]+"
    ...
    See more | Go to post

  • What can i do with this error “java.io.NotSerializableException”?

    i am working on a java project and i want in the begging of the programme to load the things from the file and then add some things... I am getting this error

    Code:
    "java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException:      pcshop.Pc 
    
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
    at java.util.ArrayList.readObject(ArrayList.java:733)
    ...
    See more | Go to post

  • vensriram
    started a topic JAVA - file not found exception
    in Java

    JAVA - file not found exception

    I am trying to read a file with
    Code:
    FileInputStream fstream = new FileInputStream("file1.txt");
    I have placed the file exactly in the folder where the CLASS File s there. still i get an error saying "The system cannot find the file specified"

    Any suggestions?
    See more | Go to post

  • AnonyNewbie
    started a topic How to add online images?
    in Java

    How to add online images?

    I have a question that how to add an image from an online URL into the JFrame?

    This code is for local file.
    Code:
    ImageIcon picture = new ImageIcon("C:\\Users\\User\\Pictures\\abc.jpg");
    This is for picture in same folder.
    Code:
    ImageIcon picture = new ImageIcon("abc.jpg");
    But how about image from online?

    Thanks.
    See more | Go to post

  • How to resolve NumberFormatException : for input string error?

    This is a part of my code, where Im trying to generate a few patterns, Now Im getting an error saying :
    Exception in thread "main" java.lang.Numbe rFormatExceptio n: For input string: "C2"
    at java.lang.Numbe rFormatExceptio n.forInputStrin g(NumberFormatE xception.java:4 8)
    at java.lang.Integ er.parseInt(Int eger.java:449)
    at java.lang.Integ er.valueOf(Inte ger.java:554)
    at nprf.offline.Pa tternGenerator. doGeneratePatte rn(PatternGener ator.java:77)...
    See more | Go to post
    Last edited by Stewart Ross; Apr 14 '12, 12:23 PM. Reason: Added code tags and moved your explanation to the top of the question

  • Saladin
    started a topic Sending Data to a Database from a Struts Form
    in Java

    Sending Data to a Database from a Struts Form

    Hi,

    I'm building a small application to get to know Struts2 and JSP.

    I have a JSP page that contains a Struts form which basically takes in a person's name, phone number and address but I have no clue how to send that information into the table I have already built in my local database.

    Can anyone show me an example or get me started?

    Thanks!
    See more | Go to post

  • AnonyNewbie
    started a topic Need help for improvement.
    in Java

    Need help for improvement.

    I need some help to improve my code.
    My code is duplicating the output, and the output format is not what I want.

    Here is the full Pseudo code.
    Code:
    int binary = 0;
    int sum;
    
    while(binary<256)
    sum = 0;
    for(go through all 8 digits)
        if the i-th digit is 0
            sum += i
        if the i-th digit is 1
            sum -= i
    end for
    
    if sum == 0
    ...
    See more | Go to post
    Last edited by AnonyNewbie; Apr 13 '12, 12:46 PM. Reason: Problem Solved.

  • how can I display data into my Jtextarea from my data base Mysql

    hi,
    I have problem when I try to displa data from my database mysql to my jTextarea,when I compile I have an error exception like :

    Code:
    SQL Exception: java.sql.SQLException: Can not issue SELECT via executeUpdate()
    I have used a select query from my table where the name is the name writed in my jTextfield,this is my code,I hope that some one help me because I don't know how to reesolve the problem and thanks:...
    See more | Go to post

  • swing- How do I read *.doc (MS Word) into JTextPane?

    I'm using the apache POI to read MSWord documents. I'm using this example as a template:

    http://javamix.wordpre ss.com/2009/05/14/reading-data-from-the-doc-file-by-using-apache-poi-api/

    The problem is I want the contents to read into a JTextPane. And insertString() is not recognized by HWPFDocument.

    From the 'for' statement that prints to console from the example in the link above, how do change it to print...
    See more | Go to post

  • BufferedReader.read() blocks,when checking if there's any input for some URLs

    Hi everyone ,

    i have the following problem :
    I am working on an application that index web pages. When i read the content of some URLs, BufferedReader. read() blocks, e.g. "http://profile.myspace .com/index.cfm?fusea ction=user.view profile&amp;fri endid=29422575" . All the alternatives that I've found have not solved this problem. This is my java code:
    Code:
     public static void main(String[] args) throws Exception
    ...
    See more | Go to post

  • splashmac
    started a topic Access is not working after Java upgrade on pc.

    Access is not working after Java upgrade on pc.

    I have a split database used by up to 8 users with no problems. Front end Access 2007 backend Access 2003. Some of the users have had Java on their pcs upgraded to work with another aplication and now they are unable to use the Access DB. There is no Java connection involved.Versio n 1.6.0_18
    Would bringing backend up to 2007 help or is it more complicated.
    Any ideas appreciated.
    Keith
    See more | Go to post

  • tqa89
    started a topic cannot save date from user input to database
    in Java

    cannot save date from user input to database

    Hi,
    When user input the date,I want to save it to database. But I'm not sure about the date format,whether I should change the format?
    I'm using getter and setter method to save to database.I'm using db2
    This is my code.
    Code:
    DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
    Date startDate=user.getDate_from();
    				dateFormat.format(startDate);
    						user.setDate_to(startDate);
    ...
    See more | Go to post

  • zeinz
    started a topic Passing dll parameters & use it in java applet ?
    in Java

    Passing dll parameters & use it in java applet ?

    Hi,

    I'm working on some project which in it i use labview to make a vi then i convert this vi to a dll file with the parameters i used in the vi.

    so i want use this dll into my applet .. in other words i want to make communication between java & dll parameters.

    I searched about how to make this issue & i found that i must use the JNI to make connection between the java & the native code of...
    See more | Go to post
Working...