35,618 Topics

Member Avatar for
Member Avatar for SarahEng

Hello All , I work in project make share screen and remote access between client and more viewers I have Some problems in this project first : sending image i use WCF to connect client with viewers and achieve that more viewer can see and control the client screen second …

0
46
Member Avatar for J-Dub

I am trying to load a background in full screen mode, but when i run my program the screen is just white. Can someone point me to the reason why? [CODE]import java.awt.*; import javax.swing.*; public class DrawComponents { GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice device = env.getDefaultScreenDevice(); GraphicsConfiguration gc = device.getDefaultConfiguration(); …

Member Avatar for sirlink99
0
257
Member Avatar for woojungkyu

What is the best algorithm for finding the number of integers divisible by X? I can easily do a: [code]for(num=1;num<maxRange;num++) { int result = 0; if(num%Y==0) { result++; } }[/code] but what if the maxRange is a really huge number (say a 9 or 10 digit number)? I need something …

Member Avatar for hfx642
0
165
Member Avatar for geeerald1131

How to Align This Perfectly Blueberry Muffin 1.45 Strawberry Bagel 0.80 Lite Yogurt 0.75 Vanilla Ice Cream 2.75 Hash Browns 2.50 Toast 2.00 French Fries 1.50 Onion Soup 3.00 Coffee 0.90 Iced Tea 1.00 Hot Chocolate 1.75 Here is my code. [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.awt.event.ActionListener.*; …

Member Avatar for hfx642
0
86
Member Avatar for mohamed moamen

I did a program that connecting to database then show data and user can ( add or remove or update ) data but my problem that program take a little time to be ready how i can know that time and make notification for user to use program now or …

Member Avatar for mohamed moamen
0
443
Member Avatar for acer3

i keep getting this: Exception in thread "main" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:205) at Pinopoly.diceRoll.<init>(diceRoll.java:17) at Pinopoly.board.<init>(board.java:26) at Pinopoly.board.main(board.java:38) Java Result: 1 i used: dice1.setIcon(new ImageIcon(getClass().getResource("/new/dice1.jpg"))); the image is in the same folder as the java files. what could be wrong? oh and i tried changing the image and it worked.

Member Avatar for Taywin
0
127
Member Avatar for RVVW
Member Avatar for roycy

so I need the answer of this qustion : write program in java to creat array from ten integer and count the number of negtive and positive and zero 45,82,-1,35,-4,0,-8,0,9,-11?

Member Avatar for peter_budo
0
48
Member Avatar for jbvincennes

Hi, I find classes sources on the web that import import org.dyno.visual.swing.layouts.Constraints; import org.dyno.visual.swing.layouts.GroupLayout; import org.dyno.visual.swing.layouts.Leading; But I cannot find this package with google searches. Where is it? Many thanks for your help.

Member Avatar for jbvincennes
0
521
Member Avatar for andimiami

Hello! I am a student (obviously, haha), and I am confused about how I need to do something in my driver class. I have a text file that I am reading in, then I decided to use a string tokenizer to parse the data. Now, I need to store the …

Member Avatar for andimiami
0
196
Member Avatar for anise

[code]import java.util.*; import java.util.Scanner; public class exec { public static void main(String[] args) { int num; Scanner inputDevice = new Scanner(System.in); System.out.println("Enter a letter / integer or -1 to quit:"); num= inputDevice.nextInt(); System.out.println("Enter a letter / integer or -1 to quit:"); num= inputDevice.nextInt(); System.out.println("Enter a letter / integer or -1 …

0
67
Member Avatar for dhija22

HI everyone...i have writing a program in java,but now i ought to write the same progam in uml...do u know if exist andy program that transfer a code from java to uml?thanx ,i am waiting Regards dhija 22

Member Avatar for JamesCherrill
0
88
Member Avatar for vmc

I have done most of the code but am struggling with one bit now, please help The brief is Write a class named Month. The class should have an int field named monthNumber that holds the number of the month. For example, January would be 1, February would be 2, …

Member Avatar for JamesCherrill
0
2K
Member Avatar for akemi3

Hello, I'm currently taking AP Computer Science with no prior experience with programming and I am facing a bit of a problem with the last problem on my programming assignment. You see, what I have to do is write a program that displays a name four times either horizontally or …

Member Avatar for akemi3
0
98
Member Avatar for knight fyre

I'm trying to learn Java Servlets on my own but I'm having some very basic problems. The code [CODE]"import javax.servlet.ServletException;"[/CODE] produces a compiler error, "the import javax.servlet cannot be resolved". I'm using version 3.2.2. Why am I having this problem?

Member Avatar for varun.x.anand
0
624
Member Avatar for vmc

I have done most of the code but am struggling a bit now, please help The brief is Write a class named Month. The class should have an int field named monthNumber that holds the number of the month. For example, January would be 1, February would be 2, and …

Member Avatar for JamesCherrill
0
195
Member Avatar for sirpatrick

how do i learn java gui? i inkow java commands line but am not familia with gui which software i need to , inkow only eclipse,and jdk

Member Avatar for Taywin
0
63
Member Avatar for Pancho jaylana

hey can u help me by dis problem please write the application to display a window with Code GUI..right Now help me

Member Avatar for JamesCherrill
0
133
Member Avatar for Pizza67

Hi all. I'm a JSP newbie and I'm trying to write a small client application that should facilitate the user authentication onto wifi hotspots provided by a telco operator from my country. Basically the application stores the user credentials and when the user push the (only) button on the GUI …

0
149
Member Avatar for TigerTeck

[CODE]public class CashRegister { public CashRegister() { purchase = 0; payment = 0; } public void recordPuchase(double amount) { purchase = purchase + amount; } public void enterPayment(int dollars, int quarters, int dimes, int nickels, int pennies) { payment = dollars + quarters* QUARTER_VALUE + dimes*DIME_VALUE + nickels*NICKEL_VALUE + pennies*PENNY_VALUE; …

Member Avatar for JamesCherrill
0
134
Member Avatar for CKShia

I am writing a simple program to get user input from Scanner to perform some tasks, I want to get user input only from the number 1 to 3, any negative number or string will display an error message and prompt user to re-enter. Here's comes the problem... When I …

Member Avatar for JamesCherrill
0
269
Member Avatar for jeypijeypi

I am creating a web-based app written in JSF and Java. One functionality of the system is that the user can select a text file from his pc and import it in order to get the data inside the text file. Do you have any idea on how can I …

0
114
Member Avatar for MonicaClare

hi.. uuhhmm.. i have a problem in how to put an String Buffer method here in my code.. uuhhmm.. i just want to know the easiest way of putting a String buffer .. please help . . thanks.. [code="java"]import java.awt.Graphics; import java.util.Random; import javax.swing.*; public class Change { public static …

Member Avatar for jade_1453
0
148
Member Avatar for Blink383

I had to reconstruct my program from the last time I had posted for help. My instructor enlightened me that I needed to follow her example to the tea, even though I had the same output that was required, I did not have all concepts required meet. So, after spending …

Member Avatar for Taywin
0
230
Member Avatar for julylee06

Ok, so I need some guidance. Am trying to implement a linked list in java. I can't get it. I have been on here - dreaminncode, wikipedia, and some other colleges sites - I still don't/can't get it. I did look at the previous threads on this but they didn't …

Member Avatar for julylee06
0
226
Member Avatar for Jfunch

I have a program that uses two threads, one that adds some numbers and the other takes the sum and finds the average. I used a blocking queue to pass the sum to the other string. I have no problem queue.put() to put the total in the queue and then …

Member Avatar for JamesCherrill
0
220
Member Avatar for bokz06

i have created an app which reads lines from a .txt file, splits the line at a " " and then stores them in a ArrayList which then gets put in a JTable. i created 27 columns and named them... now i want to add an extra column on the …

Member Avatar for Ezzaral
0
684
Member Avatar for vbmore

Hi friends, I am a very new user of this forum and want a simplest program on insertion sort. Can anybody provide me this?

Member Avatar for peter_budo
-1
242
Member Avatar for Slyvr

I'm completely new to JSP but not Java [CODE]<div> <%@ page import="java.util.*" %> <%= Date date = new Date(); out.println(date.getHours()+":"+date.getMinutes()+":"+date.getSeconds()); %> </div>[/CODE] All I need is [CODE]Hour:Minute:Second[/CODE]. (Edit: stupid emoticons) I'm getting this error on Date [CODE]Multiple annotations found at this line: - Syntax error, insert ")" to complete MethodInvocation …

Member Avatar for Slyvr
0
227
Member Avatar for sirlink99

I am making hearts, and I cannot seem to add all the cards to the deck. here is my code [CODE] import java.lang.reflect.Array; import java.util.Vector; public class Hearts { String cards[][] = {{"Spade ", "Heart ", "Club ", "Diamond "}, {"A","2","3","4","5","6","7","8","9","10","J","Q","K"}}; Vector <String> deck = new Vector<String> (); String player1[] …

Member Avatar for sirlink99
0
123

The End.