32,204 Topics
| |
Hi, I have a problem with some resource files (i.e. .txt) which I have created in the project under let's say com/myapp/resources. I have a class created: com.myapp.util.MyClass which reference a file.txt located in resources folder: [CODE] MyClass.class.getResourceAsStream("../resources/file.txt"); [/CODE] The project is created in eclipse. After I export the project … | |
Any tips on how to connect them? COmments are highly appreciated. Thanks! | |
Hey everyone, I'm trying to make a button have an image, it used to work but for some reason, now it doesn't. This is the error: [COLOR="Red"]Exception in thread "main" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(Unknown Source) at Main.createImageIcon(Main.java:109) at Main.<init>(Main.java:82) at Main.main(Main.java:103) [/COLOR] I see that the error is the: [CODE]ImageIcon NewFileIcon … | |
I am wondering if there is a way to make a MySQL database using my java program without actually having a defined username for the admin. for example I would make a program that you could install on all computers in a network that connect to a newly made database … | |
Hello everyone .. I am new to this excel reading !! Introduction: I have a link to a txt-file(or doc file) in excel file and i need to read a data present in the linked file. I can read normal text present in excel file.. Problem : but not able … | |
I am attempting to run a junit test against a JAX-WS service method using a simple client class and compiled generated sources from ws-import. When the test is run through surefire while doing either test or install I get the error java.lang.NoSuchMethodError: com.sun.xml.ws.api.model.SEIModel.getJAXBContext()Lcom/sun/xml/bind/api/JAXBRIContext; but when I inspect the xml in … | |
Hi folks, Right now I'm trying to learn about multidimensional arrays. I'm currently working on an assignment where I have to store data in said arrays. However, the input format is funky and surpasses my knowledge of how I can store it. The problem is generally along these lines. X … | |
Hi. Can somebody help me? I am trying to create a program that reads random line from a file and displays them. My problem is, it keeps repeating the same line after a few tries. i have 8 total lines from my file... this is my code so far... [CODE]public … | |
Hello Friends, I have one project in Java but the exe file cant show the system.out.println messages. I want to create a jar file in such a way that the error of file e.g. abc.java should be viewed when I click the jar file. is there any possible way.... | |
How did you learn Java? I just watched the basic and intermediary video tutorials from thenewboston.com and I'm still not 100 percent. I've moved onto the android application development tutorials which deals with a lot of java, and I still don't totally understand it. It started off with a bunch … | |
Hi mate, I am doing a mini program in java that let us look up word as a dictionary. I tended to use database to store words and their meanings, but my teacher suggested me using file (or xml). I chose using file (write a vector to file). Can u … | |
Can anyone give me an example iniitialing a non zero value using arrays If u cant give an example pls dont respond.Thanks:) | |
i am using a java program and i need to store two sets of data (radius and thickness) there are elven of these i need to store. my question is firstly how to store these into an array without having to do user input each time. then say i need … | |
I'm trying to get my JPanel (JFrame?) to resize itself to fit randomly drawn shapes. I have a shape superclass and right now I'm working with my line subclass. Everything is working fine except I can't figure out how to make the shapes fit the size of the JPanel. Should … | |
I am trying to make a screen recorder, but I am having trouble converting the images I capture to a video. I have done some research, but JMF doesn't seem to work for me(maybe because I am running 64 bit), and I have not been able to find anything else. … | |
hi I develop MDI App in which we want to child frame to child frame and parent to child frame communication. If any one knew it plz help me. | |
it involves using a static array to build and hold the coefficients values and evaluate and analyze them as well as to export the results to an external file such as a text file here is what i have so far any help would be appreciated. [CODE] import java.util.*; import … | |
Hi guys, i wonder why i get this error could not find or load abc. Basically i am using command prompt to run the java file. The command is like this: java -cp weka.jar abc then i have that error show above. | |
Waaah, i got a project, but I can't get it write, i'm not bad at programming but,it's just happen my professor is really busy. teaching is just his part-time job. I can remember we stop the discussion somewhere introducing objects.. but haven't really discussed about things lets go back to … | |
Good day everyone, I have a question. I am constructing a timer in Java console, wherein this timer should be located in one corner (such as upper right). I can only make it count up on its own place. My question is how can I place the code on the … | |
Hey guys I got a problem, my program is suppose to take 10 numbers or grade scores and output the max, min and avg. score. My program writes out the max and the avg, although the avg dosent come out correctly because i am not getting a min for a … | |
I have devised a quick little program that captures the screen and puts it in a vector, but my problem is that when I go to save it gives me this error [code] - create processor for the image datasource ... Setting the track format to: JPEG - create DataSink … | |
I am trying to figure out this one out. The directions: Write a class named car in the following fields: [LIST=1] [*]yearModel - The yearModel field is an int that holds the car's yea model. [*]make - The make field references a String object that holds the make of the … | |
Hey guys, I have the assignment of writing the Towers of Hanoi program then testing it. I already got help measuring the time of the program, but that is not what my professor wanted he wanted to count the iterations. I can't get it down, my program will run but … | |
Below i have my Main class and a MortgageCalculation class I am trying to modify my app to do the following: "Modify the mortgage program to display 3 mortgage loans: 7 year at 4.35%, 15 year at 4.5 %, and 30 year at 4.75%. Use an array for the different … | |
I am using jasper report (ireport for designing). I want help regarding to set [B]relative path[/B] of the [B]images and jar[/B] files for report... As the jasper report pick up the [B]absolute path[/B] so it create problem when the drive is changed or even pc is changed... Kindly please help … | |
| Hello All! I am making a simple four-in-a-row style game where 2 players can play against eachother. This is part of an AI course I'm taking where we should demonstrate the machine (the AI) playing against the player. The game part of the game and the gui are completely separated. … |
Hello I feel stupid for actually asking this but how do I ping a IP address in Java? I have this code [code] try { // Google.com if (InetAddress.getByAddress("173.194.35.133".getBytes()).isReachable(1000)==true) { //Boolean variable named network network=true; //Ping works } else { network=false; //Ping doesnt work } } catch (UnknownHostException e3) { … | |
**hi ... i am new in java swing. i am using netbeans. i've two frame named jFrame1 & jFrame2. jFrame2 contains a jTable. jFrame1 contains a jTextField & a jButton. while user input a value in jTextField and press JButton, jFrame2 will appear and output (from mySQL database) will be … | |
Hye all, I had a difficulty in codes a ball collision in java. Is there anyone could help me to code it. Here the requirement: 1) There will be two balls in the same size. 2) They move randomly at constant speed until they meet each other. 3) Once collided, … |
The End.