31,001 Topics

Member Avatar for
Member Avatar for Derek_4

I am working on a project in BlueJ which I have to add an "Event Post" to a simple social network project. I have created the project but I am unsure how to take a string, such as "message", from a subclass of the Class Post and print it the …

Member Avatar for Phaelax
0
219
Member Avatar for Violet_82

Hello guys, I hope you can help me with this. I have read a bit about GUI and now I am trying to do a few exercises to consolidate what I have read. In the first exercise I have to reproduce a simple GUI. Well I thought it was simpleā€¦ …

Member Avatar for Phaelax
0
448
Member Avatar for gil.nickson

This code is working but i want my added words to show in vertical because its output is shown in horizontal if two or more words is inserted. Can you help me to improve my program? Here are the codes... /** * Write a description of class Stacks here. * …

Member Avatar for Phaelax
-1
259
Member Avatar for narlapavan

I want rich textbox control in java in nebeans, where i can able to paste content from documents. Here content means not only plain data but also tables from ms-word documents. I tried above feature using "jeditorpane" but i am unable to retain table structure. please suggest me how to …

Member Avatar for Phaelax
0
357
Member Avatar for alansoeric

hey i need help once i run it will proceed to next one it will show error message package test1; import javax.swing.JOptionPane; public class Test1 { public static void main(String[] args) { int counter; int counter1=0; int counter2=0; int counter3=0; int counter4=0; JOptionPane.showMessageDialog(null,"Welcome"); for(counter=0;counter<20;) { int num1; String firstinput = …

Member Avatar for stultuske
0
190
Member Avatar for ifybest

i need help on rsa encryption and decryption using digital signatures on text files only

Member Avatar for stultuske
0
54
Member Avatar for sk8ergirl

I have jList and DB the DB have first name , last name , id and email the jList will only display the first name , last name and id what I'm trying to do is when the user select item in the jList the email will appear in the …

Member Avatar for stultuske
0
290
Member Avatar for pspwxp fan

Hi, sorry for posting a second thread for the same project but as far as i can tell, the issue is completely different. My Netbeans project seems to be working with a "cache" of a certain class. It seems like this because I commented out all the code in that …

Member Avatar for pspwxp fan
0
239
Member Avatar for ZixCo

I'm making a messenger app and I need to know how to set up connections so that somebody could send messages to other via WI-FI.I googled a little and I find something at this page [Click Here](https://code.google.com/p/simple-android-instant-messaging-application/source/browse/trunk/src/com/mekya/communication/SocketOperator.java)but I don't understand it.Here is my main class/StartingPoint (all my code is just …

Member Avatar for cool_zephyr
0
397
Member Avatar for DamianFox

I'm doing an application in which I have to show a sequence of pictures: The sequence is the follow: A red X has to be shown for more or less 400 milliseconds; An image called "Screenshot" has to be shown for more or less 500 milliseconds; An image called "Noise" …

Member Avatar for DamianFox
0
2K
Member Avatar for Derek_4

I am working on a basic classified ad system that when used prompts the user with several questions. The user input answering those questions is then printed out when the user enters a show command. I am trying to figure out a way to store the previous input while still …

Member Avatar for Derek_4
0
290
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
576
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
160
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
320
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
219
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
145
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
271
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
146
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
223
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
206
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
174
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
749
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

The End.