32,199 Topics
| |
I need to instantiate a class during runtime based what a user has selected in a list, but these classes each have their own new specific functions and variables, they use the same named functions, but set different variables, and different numbers of variables. I made an example, since my … | |
I am trying to save an image with this line [CODE]ImageIO.write(image, "JPG", new File(fileDestination.getText()));[/CODE] but it is giving me an error. [CODE] java.io.FileNotFoundException: C:\Users\Adam (Access is denied) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.<init>(Unknown Source) at javax.imageio.stream.FileImageOutputStream.<init>(Unknown Source) at com.sun.imageio.spi.FileImageOutputStreamSpi.createOutputStreamInstance(Unknown Source) at javax.imageio.ImageIO.createImageOutputStream(Unknown Source) at javax.imageio.ImageIO.write(Unknown Source) at screenCapture.CaptureScreen.actionPerformed(CaptureScreen.java:111) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) … | |
Hi folks.. Can you tell how many times the loop is executed with [B]exact[/B] reason. [CODE] int c=10; while(c>1) { c++; } System.out.println("loop over."); [/CODE] I am expecting an indepth answer... | |
Tell me what u think I want to create an application that takes a stream of stock price data from many stocks. It then checks for resistance levels. If the stock has hit a level consistently and then bounced back down twice, it is saved to a jtable file or … | |
Hello all, I want to develop Android java applications for Android Smartphones(>Android 2.1) and Android Tablets(>Android 3.0). I had already downloaded the Latest Android SDK and Eclipse plugin for that. The entire environment for developing the android application is ready with me. I have professional experience of programming in C++ … | |
hello, i have a question--- i have to implement arraylist by using array. and i m using following approach- [CODE]package DS; import java.lang.reflect.Array; public class ArrayList<T> { T ob[]; public ArrayList(Class<T []> c, int s) { // Use Array native method to create arra of a type only known at … | |
As java programmer know that program made under java are converted to jar file for usage... And an updation in any class require that jar to be updated. So is there any way that we can update the class file at runtime rather then whole jar file. I want to … | |
hi, i have a JButton object and i added an actionListener to it. it works well with a mouse click, but if use the keyboard enter key while the focus is on the JButton, nothing happens. do i need to add a keypress listener on top of the actionListener to … | |
Hi, i am new to crawljax. I am trying to crawl linkedin website using crawljax and java. Till now i am able to login into linkedin site and search a user. The search results in a list of users. Next i want to click one by one on all searched … | |
I have a java gui app which will be used by various secondary schools. I'm actually in the process of adding some "activation/serial code" before someome can use the program(they need to pay for it). I'm thinking of using an online mysql from a remote server to store and check … | |
Hi all, I just make a program and I get in trouble about set method.so anyone can help me? [CODE] import java.util.LinkedList; public class Polynomial { private LinkedList<Integer> coeff = new LinkedList<Integer>(); private int deg = 0; /* Constructs a new polynomial of degree zero */ public Polynomial() { } … | |
hey can any one help me in writing the code : Write a Java program that sorts given integers using threads I am not able to proceed ..What should i have in main function() | |
A university wants to aumomate the parking area present inside the premise. Students and faculty members are required to buy passes in order to park their vehicals in the parking lot. The different types of passes available are : Cars : Weekly pass : 70 rs Monthly pass : 280 … | |
Hi everyone... My boyfriend's birthday is on Saturday, August 13...and i wanted to do something really different this time...since we are 1,000 miles apart...i was thinking if i could write a program which would generate random messages which I would already have written in the code... i was thinking of … | |
Hey I am making a game and i can make the character jump, but i am trying to make the character land on an object. I am trying to do this with object collision but im not sure how. My code for jumping for an image with a certain height … | |
am developing a typingTutor quite similar to mavis beacon. i have designed the keyboard which highlights the press key on the syatem keyboard whenever a key is pressed. the program has a screen that displays moving text which the use has to type to match correctly.my problem is how to … | |
I have made this screenshot program in hopes of eventually making a screen recorder, but I am having trouble displaying the image for the user to see. I currently have it so that it displays and saves. When it displays it is blank, but when it saves there is a … | |
I am using MouseRotate class of Java3d to rotate two cylinders. But when i rotate one cylinder the other cylinder rotates with it. Is there a way around this problem. Thanks. | |
Hi, I am trying to create a make file for a java project. It has a directory structure look like this: src folder [INDENT]-package1[/INDENT] [INDENT][INDENT]-java files[/INDENT][/INDENT] [INDENT]-package2[/INDENT] [INDENT][INDENT]-java files[/INDENT][/INDENT] [INDENT]-package3[/INDENT] [INDENT][INDENT]-java files[/INDENT][/INDENT] [INDENT]-package4[/INDENT] [INDENT][INDENT]-java files[/INDENT][/INDENT] I am new to makefile, but tried to create one according to some tutorials on … | |
The below code is showing error i checked lots of time didn't find any error please help me. [CODE] class emp{ int id,sal; String name; emp(int id,int sal,String name) { this.id=id; this.sal=sal; this.name=name; } void show() { System.out.println("Name: "+name); System.out.println("Salary: "+sal); System.out.println("ID: "+id); } } class manager extends emp{ int … | |
hi there im just new with java i just want to ask can 1 dialog box contain multiple lines i min like this one JOptionPane.showMessageDialog (null,"\n "+EN ) ; somehow i want to add just like JOptionPane.showMessageDialog (null,"\n "+EN , "\n another messages here then" +DR , "\n and another … | |
Can someone help me and complete this simple polynomial program(can be demonstrated using linked lists); [CODE]public class Polynomial { /* Constructs a new polynomial of degree zero */ public Polynomial() { } /* Returns an integer representing the coefficient * of the x^power term */ int getCoefficients(int power) { } … | |
what is the meaning of org.apache.jasper.JasperException: /carsar.jsp(1,1) The value for the useBean class attribute com.sarath.cars.CarBean is invalid. error? | |
Hi; I've been working on this for 2 days now and am hoping someone give me a tip. New to Java code so bear with me. I need to create 2 panels in a frame. Each frame must contain 2 images. Frame 1 must be a fixed width allowing the … | |
Hello, I am working on a program that generates 100 random integers and then sorts them into even and odd. When i go to compile the program, it tells me that it cannot find variables randonum, evennum, and oddnum. I'm new to arrays so i'm guessing i declared/ defined them … | |
I used one action listener for an array of buttons that do different things. Exploring methods. I am fairly new to java. I just made a tic tac toe program. I am hoping for people to look it over and tell me what they think, ways to make it better, … | |
String<ArrayList> selitems; String<ArrayList> cartitems; what are the possible mistakes? | |
[code]import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.ServletException; import javax.servlet.http.HttpSession; import java.util.ArrayList; import java.util.StringTokenizer; import java.io.PrintWriter; import java.io.IOException; import java.text.DecimalFormat; public class ShoppingServ extends HttpServlet { String link; String[] books; String[] music; String[] computers; String<ArrayList> selitems; // JAVA.STRING.LANG doesnot take parameters error String<ArrayList> cartitems ;// JAVA.STRING.LANG doesnot take parameters error … | |
I need to run some code written in Java from my personal website. How do I even begin? | |
I am making a game where random obstacles appear. The obstacles will move towards you. I currently have this code to animate the obstacles. [CODE] for (int i = 0; i < obstacle.size(); i++){ // animate walls obstacle.elementAt(i).x -= 1; } [/CODE] My vector multiple instances of the Walls class … |
The End.