32,204 Topics
| |
Hello Good day. Here is the problem I am trying to solve. I have a table as seen below. ![232465554203149acd8363d3a4a127ae](/attachments/large/3/232465554203149acd8363d3a4a127ae.jpg "232465554203149acd8363d3a4a127ae") My GOAL: Columns A through G are going to be filled with integers. (I have already created an integer model so that these cells only take integers). As the … | |
I've been asked to edit the code in this post http://www.daniweb.com/software-development/java/threads/455560/java-recursion-brute-force-sim so that it "Runs the function as a thread which wouldn’t then hang the program whilst it’s waiting for the result". I've looked it up, but I'm struggling to apply it to this program, any tips? | |
I am using the following code to write to the file out1.txt: try{ FileWriter fostream = new FileWriter("out1.txt"); BufferedWriter out = new BufferedWriter(fostream); out.write("jlsdfjdlsfhsdkjf"); out.close(); }catch (Exception e){ System.err.println("Error: " + e.getMessage()); } Now i want to write to multiple files in the same code (let us say 2 files). … | |
Hello. I submitted [this](http://www.daniweb.com/software-development/java/threads/455615/java-decryption-problem) post a little while ago where I had problems with decrypting what I encrypted. Now my problem is that when I encrypt something and then decrypt it, the decryption works with txt files, but when I try to decrypt microsoft documents, then they will not open. … | |
I want to count the number of attempts the user tried to guess the correct guess. How would i do that? like I have thought of a number. Try to guess it Take a guess: 5 Your guess is higher than mine Take a guess: 3 Your guess is lower … | |
I'm trying to make this work, and I keep getting errors, can someone fix it and show me what's wrong? I've been trying to fix this for a few days and I can't. Thanks in advance. import java.awt.*; import java.applet.*; import java.util.*; import java.awt.event.*; import javax.swing.*; public class FrameX extends … | |
Hi chaps, I am looking for a not too difficult exercise which involves superclasses and subclasses (the java book I am reading doesn't really have any good one). So I was thinking about something like this: Create a superclass 2DimensionalShapes and 2 subclasses Rectangles and Triangles. I will then need … | |
Hello, My teacher asked us to write a little O.S simulator, my group has to write the file system module. We are using contiguous block alocation for the files, we would like to represent the utilization of the blocks using a colored matrix, where the used blocks would be red … | |
Tryin to sort a search method for abit of code. Have an array list reading from a csv. Any help on how I can get a search method searching through and displaying onto a jTextArea? This is my code in my Gui public class DataGUI extends javax.swing.JFrame { public class … | |
running 'java -version' on my cmd prompt gives me the version of my JRE but when i run my programs as 'javac abc.java' it says 'javac' is not recognised as an internal or external command, operable program or batch file. I have set the Path variable by appending C:\Program Files\Java\jre6\bin … | |
Hello, I have created a GUI using the Netbeans GUI Builder and I have a JTextArea that I want to output to, but because I need to use threads I am doing a lot of processing in an external thread. I am having issues outputting data from the thread class … | |
Hi, I wonder if anyone can possibly help. I am trying to teach myself how to integrate a Java video into a Java GUI / Swing Application. I am pretty competent with building Java graphical user interfaces and the background Java application code, however I am puzzled with how difficult … | |
Hey, Can i know how to do the throw and catch for my java code ? i need to create a OfferException class which allow a suitable error message to be specified when there is an error. this is my code.. public boolean makeOffer(int offerPrice) if (!super.getSaleStatus()) { System.out.println("Error - … | |
I have four JTextFields where user is allowed to enter only numbers. Question is how do I do this? | |
Hello, I am making an IRC application and I was wondering how I could make a simple event that gets called like onMessage() every time a IRC message comes through so I can then do something like this in my main class: public void onMessage(String message){ System.out.println(message); //or Handle commands … | |
Im new to java swing, and Ive got a little problem. So I've got a class Flight.java. In there I have a method displaySeat2D(). First I had this done with the scanner. Now I have to use swing. So basically I made text fields to take in number of rows … | |
Write a java program to calculate and display the product of the odd integers between 0 and 50 | |
can the members suggest some books/links that takes advantage of what i already know about oop (the basics , from java) and utilises it to make learning C# a faster process? perhaps i should have posted this on the C# forums , felt i should keep it here as my … | |
Hello all, So I have been scouring the internet trying to find an answer to my question. I usually never have to post a question because someone somewhere has asked it, but I guess there is a first for everything. I am a VERY intro level, brand spankin new 'programmer' … | |
In the code below, I am trying to convert the target[] strings to a given format in target1[] and then sorting them using bubble sort and store it in target2[] which is a date object array.. However, when the desirable format is "EEE MMM dd kk:mm:ss z yyyy", it is … | |
Hey guys, I'm planning to develop a java web text editor which stores its entries on a MySQL database and is then private for every user. This is a learning curve for me and I will share all of my findings and such on here. Can anyone give me any … | |
Hi DW I'm a VB.Net user and I have a project which I'm doing and the problem is that I didn't find the answer to my problem in VB.Net I found it in Java so now I'm forced to complete this project in java, I must say this is a … | |
Hello, I am working on a program, and I noticed that all my threads are starting and stopping in exactly the same order I put them in, and they are not trading places in the output, or mixing output like concurrent objects should. Here is my code: public class RaceHorseAppII … | |
1.A________ statement consists of a valid identifier 2.A__________ statement is used only in case of nested loops 3.The port number 555 describes ***port 555 ***all ports greater than or equal to 555 4.The ____ method of the signature class updates data by a byte 5.The _______ constructor creates a horinzontal … | |
1.JDBC is an acronym of JavaDatabase Connectivity true/false 2.which of the following are advantages of JDBC -continued usage of esting data -vendor dependent 3.The ______ method of the string tokenizer class returns true if theres at least one token in the string aftre the current position -lastidexof -tostring -substring 4.Adavantages … | |
I am writing a program that needs to know the type of constants. I am wondering if there is any way of getting this in java? Like for constant "2" type is int and for "2.0" type is double. | |
I am attempting to encrypt and string and then decrypt it. I have the encryption part working, but when I try to decrypt it gives me an InvalidKeyException and says that it is missing parameters. Here is the code import javax.crypto.*; import java.security.*; public class Cryption { private Cipher c; … | |
Hello, I am making a Java IRC bot and it all works fine. I connect via a socket and there is a while loop that will output whatever comes through the IRC. But, I also want to accept console input while the program is running. So far I can only … | |
the data file contains: 1908,Souths,Easts,Souths,Cumberland,Y,14,12,4000 1909,Souths,Balmain,Souths,Wests,N 1910,Newtown,Souths,Newtown,Wests,Y,4,4,14000 1911,Easts,Glebe,Glebe,Balmain,Y,11,8,20000 Each line represents a season of premiership and has the following format: year, premiers, runners up, minor premiers, wooden spooners, Grand Final held, winning score, losing score, crowd What I need is to display a list of Grand Final held as 'Y'. … | |
How to I create an exe file? I've downloaded JSmooth, but it say I need binary files and I am a little bit confused. My project is in Netbeans. |
The End.