32,204 Topics
| |
I need to write a program that can draw stuff on a frame, let's say, trees. Their IDs, colors, positions etc. are in a **txt file**, line by line, the first word of the line is the name of their type which will be the name of the subclass. These … | |
Hello I have 5 jtextfield in my jframe with 5 jbitton. I just want to move the cursor from jtextfield1 to jtextfiled2 and then to jtextfield3 and so on when I press tab key. This can be done in C# very easily by setting the tab sequence while designing the … | |
hello, Iv been trying to write a java program to read an image from a list of images in a file I.E: * File * Filename * Image1 * Filename * Image2 * Filename * Image3 The problem i am having is that the filename's are string objects followed by … | |
Hey there! I have been trying to get all my JTable cells to be not Editable so you can't change the info displayed on the JTable. It sounds easy to do but I cant seem to do it. Any help would be appreciated Thanks!! | |
Hi, i want to read the data from text file and write to excel file. if some one has ready code written then please share with me. | |
I have a problem with tika parser that can't read temprory zip file that it had created . this StackTrace is : java.lang.InternalError: jzentry == 0, jzfile = 139750727169136, total = 235, name = /tmp/apache-tika-8076182698055047262.tmp, i = 176, message = null at java.util.zip.ZipFile$2.nextElement(ZipFile.java:322) at java.util.zip.ZipFile$2.nextElement(ZipFile.java:304) at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:158) at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:615) at … | |
Hi Everyone, Happy 2013 to all.I'm using JOption to print a table, how do I align the columns? I am using a single variable for the JOption. Example: QTY ITEMS UNIT PIRCE AMOUNT 1 Milk-Anchor 100.00 100.00 10 Del Monte-Tomato Sauce 1000.00 1000.00 Any suggestion will be great. All the … | |
So, I'm trying to make a game of tic tac toe using JFrame and JPanel. This creates the board image 3x3 . package book; import javax.swing.JPanel; import java.awt.BasicStroke; import java.awt.Color; import java.awt.FlowLayout; import java.awt.Graphics; import java.awt.Graphics2D; import javax.swing.JButton; public class Beginning extends JPanel { public void drawBoard(Graphics d){ int r … | |
Hi All, I need to trunk a float number with one decimal place. For eg: i have a float number called total=95.20004. my result should be 95.2. I have tried with the DecimalForma, but it is not working out. Kindly help me to resolve this issue. | |
I need to encode the sending messages/data(not MD5)and then they will be decoded on the other side. Codes have to be in android libraries not in java. Is there any code or information that may help me around internet? Thx all for your help. | |
| Design and implement the class Day that implements the day of the week in a program The class day should store the day, such as Sun for Sunday. The program should be able to perform the following operations on an object of type Day: A. Set the day B. Print … |
Hello, Im looking for a way to construct a scale-able 2d list or something of the sort. What i have so far is an array int [][] mydata = new int[6][4]; The problem is in my editor i wont know how long to make the array as people are going … | |
I am attempting to write a very simple chat program to test out ServerSockets and Sockets, the code should work, but when the client make a connection to the server it does not move past the accept method. I know they connected because as soon as I close the client … | |
Both DataOutputStream and PrintStream do basically the same thing - convert primitive types and Strings to bytes before writing them (writeUTF() is an exception). Why different classes ? | |
Hi, I want to creat a record of user journey thought the game I'm coding, that would record a script of the user inputs to a separate log file, I am thinking of creating a userrecord class and the user input will be stored into a text file using filewriter … | |
Hi Everyone I want to make my code run from command prompt I am using window 7 and JDK 6 Following are steps I did: 1) Created a Text file Example.txt. Changed the file extension to Example.java and placed it under C:\myWork 2) Open command prompt type 'dir' to see … | |
Hello, how can copy and save the console message to a file using logger. i try this :[Click Here](https://friendpaste.com/6FWNg0QIzY7DoPXisOyqpv) but it's only saving warning and info messages to my file. thank you | |
I'm confuse ..... What do I really need to install in order to use the API for bluetooth? I'm going to develope a wireless mobile application that can communicate with my laptop.... | |
Hi! I have a super class called character, subclass player. when i compile, i get this error: constructor Room in class Room cannot be applied to given types; from this bit of code in Character: public Character(Room room, String name) this.name=name; currentRoom = room; Room currentRoom = new Room(); // … | |
Hi, I am working on the World of Zuul. I am adding the take item command, when I envoke it, the output prints twice! The main class is Game, this is the take method. public void takeItem(Command command) ( if (!command.hasSecondWord())( // if there is no second word, we dont … | |
Hi, I'm really interested in things like image recognition and certain other aspects that Artificial Neural Networks perform really well at and I'm hoping to do a personal project with ANNs in the future. The problem however is that my knowledge of them isn't that elaborate at the moment. All … | |
am working on a project to write a program that finds 10 most used words in a text, but i got stuck dont know what i should do next can someone help me please. i come this far only import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import … | |
public class InputData { String[] descr = {"Apples", "Bananas", "Berries", "Grapes", "Lemons", "Lime", "Melons", "Nectarines", "Oranges", "Peaches", "Pears", "Plums", "Strawberries", "Watermelon", "Asparagus", "Broccoli", "Cabbage", "Carrots", "Cauliflower", "Celery", "Corn", "Garlic", "Lettuce", "Mushrooms", "Onions", "Peppers", "Potato", "Squash", "Sweet Potato", "Tomatoes", "Zucchini", "Cherries", "Mixed Fruit", "Peaches", "Pears", "Pineapples", "Asparagus", "Carrots", "Corn", "Greenbeans", "Peas", … | |
hi i want to upload an xml file from my computer to a server but i donot know is there is a website that do that i want to do it for test purposes but my server is not ready yet and i need to make sure that the program … | |
Ok so I am trying to build a little program and I want to be able to click on the skate or dice button and have the program open a new JFrame that has been built in another class. Currently it opens its own JFrame that was built in this … | |
# Math.round # Hi, could someone please add the math.code function in the code below so that the resulting answer in the div is to two decimal places. <script type = <"text/javascript"> function calculate() { A = document.getElementById('input').value; outDiv = document.getElementById('output'); B =(parseInt(A) * 1.0); //alert(A); D = (parseInt(B) * … | |
Hello everyone, i have a NullPointerException error in my code at line4. Can someone guide me please. the code is here:[Click Here](https://friendpaste.com/21WFtusmIesUcgQ8erTzT9) Thank you very much NS | |
i've done an application with two JTextField with the autocomplete feature the application works fine but On clicking the Tab Button while the mouse pointer is on the first TextField the Mouse focus is not going into the second Textfield but gets the focus on the second time. i.e for … | |
For each part (A) (D) below, clearly indicate whether the runtime is O(log n) or O(n). Can someone please explain how this works? public class Q9f { public static void main(String[] args) { int n = ...; int[] a = new int[n]; // (A) for (int index = 0; index … | |
i have one question. I understand the type conversion in java.But i dont know where to use which conversion. Below i have given one example,but i don't which is used where? String s=”27”; int i=Integer.parseInt(s); System.out.println(i); /////////////////////////////////// String s=”27”; int i=(int)s; System.out.println(i); Although both are doing the same thing,but where … |
The End.