32,199 Topics

Member Avatar for
Member Avatar for Dinesh_9

I am supposed to complete an java assignment which satisfies the following constraints 1)read an .html file which is given as input(This is not an weburl) just an file stored in hard-disk 2)Count the occurences of all the tags which are present in the html file but it must exclude …

Member Avatar for Dinesh_9
0
666
Member Avatar for aanders5

Hello, so I am trying to get a Netbeans application on the web, specifically in this location here: http://hellojar.elementfx.com/FunGame/index.html As you can see it loads, but then crashes as it cannot find "main". (my attempt at trying to find the right run location of my Main) Here is my HTML …

0
161
Member Avatar for dosedt

Write an application that finds the total and average of odd numbers from 1 to 15. Your program must use a counted loop to accomplish this task. So far all I have is > public class OddLoop { public static void main(String[] args) { { int total = 1; for …

Member Avatar for aanders5
0
178
Member Avatar for YumnaZia

I have tried every possible way of connecting the database to the program, but its just not happening! Help me please :( final static String fileName ="Netlync.mdb"; static{ try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ="+fileName; con = DriverManager.getConnection(url,"",""); }catch(Exception exx){ exx.printStackTrace(); }} private static Connection con;

Member Avatar for JamesCherrill
0
324
Member Avatar for aszhhtzz

Hey guys.. i am currently doing my java assignment can i dont get how to do this question. A) Using the for statement, write a Java program that reads 10 integer values from the user and prints the highest value entered. B) Using a relevant conditional loop, write a Java …

Member Avatar for Muni123
0
220
Member Avatar for Cherry Oo

Hello... everyone... I would like to get a small project for java. Help Me...

Member Avatar for peter_budo
0
52
Member Avatar for Anushree_1
Member Avatar for tingwong

Hello everyone, this is my first help post on daniweb so please excuse me if I have done something wrong. So as for my question, I have to shuffle an array of card objects. This is the code I have come up with so far. public void shuffleDeck(){ Random seed …

Member Avatar for cael13
0
1K
Member Avatar for asaidi

Hi just starting learning java .. is there drop and drag for objects in java like visual basic without importing a lot of modules and write a big code to show a window.. writing program for consol it is very good but gui a lot of code for small result.. …

Member Avatar for JamesCherrill
0
147
Member Avatar for ccyg

the codes running ok on NetBeans, and wih the error messages while I am running the jar file. Any helps with the following code would be very appreciated. Scanner file = null; while(file.hasNext()){ if (file.hasNextInt()) list.add(file.nextInt()); else file.next(); }

Member Avatar for hrishi_1
0
272
Member Avatar for XTMercenary

I'm currently creating a Java program in swing for my final year project simliar to something you'd find on codeacademy etc. i'm trying to compare the user input for example "System.outprintln(helloworld");" with a string of the stored answer for the question in this case the answer would be "System.outprintln(helloworld");" i've …

Member Avatar for JamesCherrill
0
147
Member Avatar for Dinesh_9

How can i get an users input in the format of `/home/filedirectory` and then list all the files in the path /home/filedirectory??

Member Avatar for JamesCherrill
0
225
Member Avatar for Ritesh_4

Hello I have a Java Agent which I need to maintain (dev was done by someone else), with the following code samples extracted: String type = (String) types.nextElement(); DemByDate dd = (DemByDate) client.typeDemande.get(type); Vector v = (Vector) dd.demandes; Calendar calendar = Calendar.getInstance(); calendar.set(dd.d2.getYear(), dd.d2.getMonth(), dd.d2.getDate()); int maxDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); dd.d2 …

Member Avatar for Ritesh_4
0
3K
Member Avatar for Andy90

Hi, I want to know how can I find the frequency of applications executed on desktop? My main motive here is to find least used application on desktop! I know there is a way of doing it through windows OS tools. But, I want to know how the same can …

Member Avatar for stultuske
0
207
Member Avatar for args009

Hi, I can't get my carrentalprogram to work. When I try add vehicle/customer, I get this: "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException" I think it means that what i type in my textLines = Null. I guess the methods from the class "Controller" can't be used. Here are the classes "Controller" …

Member Avatar for stultuske
0
180
Member Avatar for RikTelner

How to detect key being pressed and how to send "impulse" to PHP file about which key has been pressed? Simply Googling "PHP key detection", doesn't deliver reliable resources. Offcourse I could use JavaScript, but I wouldn't be able to get this to PHP, since, they're on opposite sides.

Member Avatar for RikTelner
0
78
Member Avatar for Patrick_3

Hello everyone! I have tried again and again to get this to work using multiple suggestions from the Internet. I am trying to convert an int[] to an Image object. I am getting the array using a PixelGrabber object: int img1_1d[] = new int[img1_w * img1_h]; PixelGrabber grab1 = new …

Member Avatar for JamesCherrill
0
760
Member Avatar for rikje.van.driessche

can annyone help me with this code? package me.nocare.who.cmds; import me.nocare.who.Whoplugin; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; public class WhoCommandHandler implements CommandExecutor { private Whoplugin plugin; public WhoCommandHandler(Whoplugin instance) { this.plugin = instance; } @Override public boolean onCommand(CommandSender sender, Command Command, String commandLabel, String[] args) { String msg …

Member Avatar for rikje.van.driessche
0
201
Member Avatar for xIllustrated

import java.text.DecimalFormat; import java.util.Scanner; public class Expenditure2 { static Scanner input = new Scanner(System.in).useDelimiter("\r\n"); static DecimalFormat fmt= new DecimalFormat("0.00"); public static void main(String[]args) throws Exception { String[] item= new String[10]; double[] amount= new double[10]; String[] month = {"null", "Jan", "Feb","March", "April", "May" ,"June" ,"July" ,"Aug" ,"Sept" ,"Oct" ,"Nov","Dec" } ; …

Member Avatar for JamesCherrill
0
84
Member Avatar for stikku

hi, My project contains a folder images.One Frame contain Jlabel.I want to display the images (at a time one image) from the folder images to the jlabel.could you please answer how to solve this? I have loaded a single image using the following query Image im=new ImageIcon(this.getClass().getResource("/images/a1.jpg")).getImage(); But I need …

Member Avatar for JamesCherrill
0
84
Member Avatar for Decode098

so we where tasked to make a tic tac toe w/ out gui or even using array so here's what ive done so far its still far from complete but i cant seem to get the result i want but since this is just a test class that would be …

Member Avatar for Paul.Esson
0
168
Member Avatar for cwarn23

I have been trying to create a script that will fetch an image file, store it in a 2d grayscale non-alpha byte array based on the x and y axis so I can perform math operations then save that array back to a new image file. I have come close …

Member Avatar for JamesCherrill
0
256
Member Avatar for nvnq

I have a java exercise follow: there are n machines of 3 type A,B,C, each machine has coordinates (x,y) and operate radius, with data get from a XML file, for instance: <machine> <number ="1"> <type>C</type> <cox>40</cox> <coy>80</coy> <rad>30</rad> </number> <number ="2"> <type>A</type> <cox>25</cox> <coy>35</coy> <rad>40</rad> </number> <number ="3"> <type>C</type> <cox>50</cox> …

Member Avatar for nvnq
0
189
Member Avatar for Arin_1

Hi, i recently begun learning java and encryption. I found some code from a website that is supposed to decrypt lastlogin files found in minecraft. When i try to compile it gives me these errors: C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:54: error: invalid method declaration; return type required public MineCraftLoginReader() { C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:87: error: …

Member Avatar for Ewald Horn
0
666
Member Avatar for rithish

hello <input type="date" name="dob" required> this is the html5 date picker String date=request.getParameter("dob").toString() how to get value from tat date picker

Member Avatar for Ewald Horn
0
152
Member Avatar for Violet_82

Hi guys, I tought I'd experiment a bit with layout managers, trying to get to grips with them. I will start with a flowLayout, then hopefully move on to more complex ones. OK, so here is the code for the first example, very simple one: /*FlowLayoutManager.java layout manager tests*/ import …

Member Avatar for Violet_82
0
163
Member Avatar for narlapavan

Hi, i am using netbeans 7.0.1, When i copy a table from ms-word document and paste it in editorpane or text area palette, i am unable to retain same table strucure i.e with no borders.How to do it and which control i have to use. Thanks.

Member Avatar for Ewald Horn
0
119
Member Avatar for Agent168

THIS IS A NO GUI TEST. GUI COMES AFTER THIS IS DONE. " i hope to learn from this so i can use it on the gui " :D i have my database : friends , table : info , values : (name ) : dragon , (address) : china …

Member Avatar for Ewald Horn
0
197
Member Avatar for mallo

I'm very much interested to develop Network IDS for my final year project , but I'm beginner to this Network security domain.Need some suggestion and some resources to develop this project.please help me .

Member Avatar for mallo
0
209
Member Avatar for Mkaveli

Hi im building a JavaFX project and am using JavaFX Scene Builder 2. I wanted to link my controller to my fxml file but i can't see the possibility to add a controller to my fxml file in Scene Builder 2. I was wondering if someone could help me out. …

Member Avatar for JamesCherrill
0
201

The End.