32,204 Topics

Member Avatar for
Member Avatar for sayalidzambre

I want to print .doc ,.docx, .xls, .csv , .xlsx, .rtf documents through java. For that up till now I got following 3 approaches but I have not reached any conclusion. 1. To convert .doc ,.docx, .xls, .csv , .xlsx, .rtf to .pdf (bcoz I am able to print .pdf …

0
22
Member Avatar for Krefie

ola, i need help fast plz, the printing function in java .print() works i.e. [CODE] jtextarea.print(); [/CODE] the problem is, if the jtextarea is longer than 1 page it will print the extra pages on some computers and not on others. I thought it a printer setting, but when the …

Member Avatar for Krefie
0
166
Member Avatar for bluebird

In c programming language, When the compiler compiles a program, the obj file is created. When that object file is run, an .exe file is generated. That .exe file contains the machine language instructions that are understandable by the underlying processor. If we run that .exe file on another kind …

Member Avatar for helioptra
0
276
Member Avatar for cfcid

The objective is to add all the prime numbers before an arbitrary input. I am wondering what exactly this person has done through this code. I am not this advanced, and I do not how to work with particularly the int[] a variable. What is the int[] a command called? …

Member Avatar for prisonpassioner
0
92
Member Avatar for ubi_ct83

[CODE] public static void main(String[] args) { int[] out; for (i=0;i<args.length;i++) { String number_string=new String(); if(args[i].equals("-i")) { if(i+1<args.length) { i++; number_string=args[i]; } StringTokenizer number=new String Tokenizer (number_string,','); int chip_number=number_string.replaceAll("[^,]","").length(); chip_number++; int k=0; while (number.hasMoretokens()) { number_int[k]=Integer.parseInt(number.nextToken()); k++; } } } for(i=chip_number-1;i>=0;i--) { for(j=0;j<number_int[i];j++) { out[j]=j; } //should be a double …

Member Avatar for ubi_ct83
0
100
Member Avatar for zaphytaffy

I am a newb, do not go to college and am learning Java on my own time. This little project is a learning exercise so I ask that any help just points me toward a right direction. It is a character generator for a table top game, that may or …

Member Avatar for zaphytaffy
0
278
Member Avatar for packer01fan

I have an assignment where I have to have seven different lottery numbers ranging from 1 to 35. A separate powerball number should also be generated. The powerball number should be within the range of 1-10. I have to write a java program that gives eight sets of seven numbers …

Member Avatar for packer01fan
0
717
Member Avatar for killerthc

I am trying to setup a simple dll that will allow me to run C++ code from Java, to start I chose to create the function HelloWorld, I can get the library to compile and load but when Java calls the native method "hello()" it throws the exception java.lang.UnsatisfiedLinkError. How …

Member Avatar for JW149
0
993
Member Avatar for idblack

Hi, im currently studying for my final test in java beginner class, so there is a problem that i couldn't solved until now, i'm totally beginner and have search the solution for almost two days :( The program is taking variabel n from other text file, then this n will …

Member Avatar for Taywin
0
167
Member Avatar for ttboy04

Hello, I am having problems in bMethod. The program compiles but there is no output display for bMethod. I am trying obtain a set from aMethod and assign this set to a suitable local variable in bMethod. Which I think where the problem is. I want trying to display both …

Member Avatar for Taywin
0
158
Member Avatar for fresidue

Hello all, I am new here and fairly new to java and programming in general. I decided to make a little color chooser hoojie for fun (jar file attached), but it is tremendously slow. Partly it is my fault (code def not perfect..) but when I checked what was taking …

Member Avatar for NormR1
0
230
Member Avatar for rajec3

Which is the best book or site for learning JAVA perfectly? What should i install on my PC to learn programming in JAVA environment?? I dont know anything abt JAVA. I am just a beginner. please help me out thanks

Member Avatar for stultuske
0
170
Member Avatar for asad_80

Hi, I have written a program where i have used array of 4 Buttons as i click on any of the buttons it image changes and on re-clicking the same button it images changes back to the original image.It is working alright but the issue is that the image which …

Member Avatar for NormR1
0
94
Member Avatar for anders10

Hi! I have a problem with getting an arraylist to work within a JList. I have posted 5 classes; a GUI class - GrafikInl6, a class with most of the methods - Functionality, and then an abstract baseclass Runner6 with the two subclasses EliteRunner6 and Jogger6. My problem is the …

Member Avatar for NormR1
0
185
Member Avatar for gedas

hey guys, i just started working on one of the projects well its has been already finished all im doing is making a few changes and it contains two .dll files (in the root of the project) if they are removed project does not compile and stops functioning otherwise (if …

Member Avatar for gedas
0
130
Member Avatar for daudiam

The ConcurrentHashMap is thread safe without locking the entire table but it doesn't remove the race conditions like if we query for a key and at that time the key is not there, so in the next instruction we add the key's entry to the map. Between the two things, …

Member Avatar for stephen84s
0
737
Member Avatar for Stefano Mtangoo

Hi friends, I need to work with an application that exposes SNMP interface. I have googled to check SNMP in general but I find it difficult a bit. I know in HTTP you send request and get response and with the two you can play around. I have never done …

Member Avatar for Stefano Mtangoo
0
120
Member Avatar for daudiam

Ordinary Maps use the following test for equality (k1==null ? k2==null : k1.equals(k2)).) IdentityHashMap uses k1==k2. My question is that even Object's equals() method returns k1==k2. Only when the Object's equals method is overridden inside a class, does it perform content based equality comparison. So, IdentityHashMap could have used Object's …

Member Avatar for daudiam
0
127
Member Avatar for yap_1991

are there any codes whereby it can read the first and last word of all the lines of a text file? I would need to read the first and last word of text files and make sure both the first and last words matches the conditions then print the lines …

Member Avatar for masijade
0
607
Member Avatar for yap_1991

Hi All I really need help in this. Im supposed to "extract" information from text files . the text files looks somethings like this: MODEL 1 ATOM 1 N SER A 253 -19.559 -25.512 -41.130 1.00 0.00 N ATOM 2 CA SER A 253 -18.749 -26.500 -41.895 1.00 0.00 C …

Member Avatar for masijade
0
421
Member Avatar for NewOrder

[code]import java.io.*; class Ex33 { public static void main(String[] args) { Console console=System.console(); System.out.println("Please enter a number"); String input; input=console.readLine(); int n1; n1=Integer.parseInt(input); double sum; int LessThanAv; for(count=0;count<100;count++) { sum=(n1+sum)/count; System.out.println("Please enter the next number"); } while(n1<sum;) { System.out.println(n1); } } }[/code]

Member Avatar for stephen84s
0
155
Member Avatar for samuel_pay

[U]Okay im a desperate need of some help here im currently doing a uni java project... im creating a single player battle war game that is turn based. ill give the overview i have wrote underneath but i need some help sorting out was classes i need and putting them …

Member Avatar for Stefano Mtangoo
0
284
Member Avatar for kaustubh.pandey

i want web based project topics in java.who's r not common in development means i want smthing defferent topic which is not more complex n easy 2 built....so pls give me sm topic...4 ma project....

Member Avatar for masijade
0
140
Member Avatar for j!sh@

hai...... plz... tell me some miniproject topics in java.we are planning to do it in 30 days.

Member Avatar for jyoti amage
-1
57
Member Avatar for migicikinyanjui

having a problem with executing this in jGRASP not acceptin user input [CODE]class salestax { public static void main (String[] args) { try { double price = Double.valueOf(args[0]).doubleValue(); double salestax = price * 0.0825; System.out.println("Sales tax is " + salestax); } catch (NumberFormatException e) { System.err.println("Usage: java salestax price" ); …

Member Avatar for lbarowski
0
606
Member Avatar for ardn0001

Hi How can I stop a class method execution ? I have been reading and the most similar solution I found is use Threads....is there another solution ? Im working with jasperreports, In order to generate report I just call single method to start the report print and another method …

Member Avatar for ardn0001
0
5K
Member Avatar for scratte

The problem is that it gets stuck on public static void queryChange(String string) { System.out.println("Sending Query: "+string); try{ System.err.println("queryChange 1"); Connect(); System.err.println("queryChange 2"); [COLOR="red"]conn.createStatement().executeUpdate(string);[/COLOR] System.err.println("queryChange 3"); }catch(Exception e){ System.out.println("SQLException: " + e.getMessage()); } System.out.println("Sent Query: "+string); } java doesnt error it just gets stuck. Sent Query: UPDATE `servers` SET `playersCurrent` …

Member Avatar for scratte
0
152
Member Avatar for cela0811

I am new to Java, and I am working on a program that functions as a calculator. I have the code for the calculator written, but I need to make a GUI for it, because as of now the only way I can see output is by running it within …

Member Avatar for NormR1
0
62
Member Avatar for sunny12

Can you people please help me in this program using only nested loops? I cannot use bufferedreader or charAt function Hard coding cannot be used. [B]The dots all stand for spaces[/B] The pattern is:- abcde .bcde ..cde ...de ....e ....ed ....edc ....edcb ....edcba The spaces are mandatory. [B]The dots are …

Member Avatar for sunny12
0
105
Member Avatar for c_shaft05

So here's the scoop: The company where I work has a few GUI-based Java programs that runs crazy fast in Windows XP. Upon upgrading 6 machines to Windows 7 (and yes, we definitely exceed the requirements to run Windows 7 on our machines), these Java programs run significantly slower (For …

Member Avatar for c_shaft05
0
2K

The End.