31,001 Topics

Member Avatar for
Member Avatar for jimoaks

Hello, I have two problems. First, I am trying to have a set background image that displays with two jbuttons on the bottom. My error is that when the back ground image is displayed it hides the buttons (until you mouse over them). Second, I want the buttons on the …

Member Avatar for JamesCherrill
0
391
Member Avatar for bhallarahul

can you please tell me that is this right forum to discuss problem on struts2 if yes, please then please look at the problem[Click Here](http://www.daniweb.com/software-development/java/threads/421470/file-upload-in-struts2) if no, then sorry for my post

Member Avatar for harinath_2007
0
59
Member Avatar for justindill

Need to add a JCombobox to select the user’s State of birth, and a JRadio buttons to indicate their gender. Also, add a JTextArea to the form. Once the user clicks on the JButton the application will display all of the user’s information in the JTextearea. All the classes work …

Member Avatar for NormR1
0
140
Member Avatar for Mopikope

I am in the process of creating a jackpot game. At the moment I am stuck trying to cycle through the different pictures and stop on a random picture for 5 different slots. So far I have this for animating: private void animatePictures() { Thread timer = new Thread() { …

Member Avatar for NormR1
0
224
Member Avatar for apanimesh061

I am trying to implement ROCK algorithm in JAVA. It is used to cluster categorical data. I have like N statements that are to be clustered. This is a good example of this algorithm: faculty.ksu.edu.sa/ykhlef/mscThesis/clustering-P1.ppt I have coded till number of links for each cluster. But I cannot understand how …

Member Avatar for NormR1
0
100
Member Avatar for mehnihma

How can I turn radio button in another class which I cannot change but I need to turn it on from another class? How can I pass action event to it? Thanks

Member Avatar for mehnihma
0
220
Member Avatar for knowledgelover

Hi there, I need to call a dll file that was written in VB.Net, in my java application using the jacob [com.jacob.com] , after successfully registering the dll file, I am trying to instantiate an ActiveXComponent object using my dll, : [QUOTE]ActiveXComponent myComp = new ActiveXComponent("Myfile.dllfile");[/QUOTE] where Myfile.dllfile is currently …

Member Avatar for muscailie
0
1K
Member Avatar for makehaste

Per the title, I'm trying to make my GUI change with the RadioButton selection. Specifically, I want to control which JLabels and JTextFields are displayed based on the RadioButton selection. Right now, my GUI displays the Employee ID, Last Name, First Name, Credit Rate, and Credit # Labels, and their …

Member Avatar for NormR1
0
339
Member Avatar for sarrrry92

Ok, I've been trying to do this for a few days, But I'm not getting it. Our Prof. is not very good, and I have no one to ask how to do this, I really need help with this. Write a program that has an array of 5 Strings, and …

Member Avatar for NormR1
0
162
Member Avatar for apanimesh061

import java.sql.*; import java.util.ArrayList; import java.util.Iterator; /** * * @author Animesh Pandey */ public class dbConnect{ jaccardIndex ji; public float calcJaccard(String s1, String s2) throws Exception { ji = new jaccardIndex(); float sim = ji.Jaccard(s1, s2); System.out.println("calcJaccard"); return sim; } @SuppressWarnings("static-access") public int getLength(String s) throws Exception { ji = …

Member Avatar for JamesCherrill
0
133
Member Avatar for michelleradu

Hi All, I have to split a text into words using both spaces and punctuation as delimiters. Punctuation includes characters like .,!?:;'"- I am using the split function as it follows: [CODE]wordsArray = strLine.split("[.,!?:;'\"-]+\\s*");[/CODE] However, this only splits my text by spaces and ignores other characters I've set as delimiters. …

Member Avatar for ~s.o.s~
0
7K
Member Avatar for mehnihma

I have problem with this part of the code private char encryptChar(char c, int shift) { if (Character.isLetter(c)) return (char) ('A' + (c - 'A' + shift) % 26); else return c; } private String encryptMessage(String msg, int shift) { String result = ""; for (int i = 0; i …

Member Avatar for mehnihma
0
203
Member Avatar for uurcnyldrm

Hi, I'm looking for a way to write a recursive method which convert a decimal to value to its binary equivalent. I can write a method which returns the result as a String, but I can't figure out to write a method which makes calculation with integer values and returns …

Member Avatar for scudzilla
0
200
Member Avatar for migelitto

Hi. I am making JMenuBars in my way but i start to understand, that my way ir crap! :D So I want to know, if there is a way, **how to know, which item from menu is set.** For example - i have menu with actors - i choose one, …

Member Avatar for migelitto
0
197
Member Avatar for alexpegg1

I am trying to create a rudimentary number guessing program with java, and it is not working out. I think i have some useless stuff in there, but whatever: import java.util.Random; import java.io.* ; public final class Number_guesser { public static final void main(String... aArgs){ InputStreamReader istream = new InputStreamReader(System.in) …

Member Avatar for NormR1
0
255
Member Avatar for Nimzy

Hey can u help me with this code..?? Its a simple game of moving darts I made on applet.. I want to restart the game from starting when i click replay but this ain't happening, please check the code: import java.io.*; import java.net.*; import java.applet.*; import java.awt.*; import java.awt.event.*; public …

Member Avatar for NormR1
0
833
Member Avatar for soham.m17

JLabel[] x=new JLabel[10]; int i=0; for(component comps : a.getComponent_list()) { x[i]=comps.getType().getImg(); x[i].setBounds(comps.getPosition().x, comps.getPosition().y, comps.getType().getWidth(), comps.getType().getHeight()); System.out.println("Coming Here,"+comps.getId()+","+comps.getPosition().x); this.add(x[i]); i++; } repaint(); I want to have all the labels in their position. after this function. but only the last added label is shown. What can I do?

Member Avatar for soham.m17
0
715
Member Avatar for soham.m17

Suppose below is my code : public void paintComponent( Graphics g ) { graphics2D = (Graphics2D)g; graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); graphics2D.setPaint(Color.white); graphics2D.fillRect(0, 0, getSize().width, getSize().height); graphics2D.setColor(Color.black); } and graphics2D is global variable declared like : private Graphics2D graphics2D; Now, how can I access g to draw lines from other methods? When I'm …

Member Avatar for NormR1
0
95
Member Avatar for renzlo

Hi Java Developers, I don't know if this is the right place to ask but I hope It is. First of all this is not my programming language, I am an intermediate .net developer, I just came up with this problem that I need to solve which what the thread …

Member Avatar for renzlo
0
326
Member Avatar for bhawna_5nov

here is the following code in java applet.. [CODE]//this is one applet which has to be opened when button is clicked... import java.awt.*; import java.applet.*; import java.awt.event.*; public class Order_info extends Applet implements ItemListener { private Label l,l1,l2; private TextField t=new TextField(); private Choice list; String s,selection; public void init() …

Member Avatar for NormR1
0
1K
Member Avatar for pritish.kamath

i wanted to display a pattern like this 4444 333 22 1 i used the following code import java.util.*; public class PatternExp { public static void main (String args[]) { Scanner src=new Scanner(System.in); System.out.println("Enter the number of lines needed"); int n=src.nextInt(); for (int i=n; i>0; i--) { for(int j=n; j>0; …

Member Avatar for pritish.kamath
0
127
Member Avatar for m1n1m3

Hi, I have a simple usb device that i can plug into a PC. The thing im looking for in user interface that is: 1) Multiplatform 2) Manages it own drivers (for plug in USB device) 3) No install file, a executable. The thing im looking for is like this …

Member Avatar for jackmaverick1
0
294
Member Avatar for agieli

hi guys,i'm new to bluetooth programming using java(Bluecove 2.1).i'm trying to establish connection between my pc and bluetooth device(my mobile phone). any help will be appriciated thank you

0
63
Member Avatar for jackmaverick1

I've got a game, and I'm trying to do it right. I've got a spritesheet (which is really just a class that loads images for easy access. It seems to work, but then my tile system starts, and it fails in an interesting way - it loads only the foreground, …

Member Avatar for jackmaverick1
0
196
Member Avatar for CWoods22

I am having trouble getting this to run. It compiles just fun, and it will let you click one button but does not recognize a second button click. What am I doing wrong? /* Chapter 6: Telephone Keypad Programmer: Charlene Wood Date: April 8, 2012 Filename: TelephoneKeypad.java Purpose: This program …

Member Avatar for NormR1
0
414
Member Avatar for apanimesh061

I want to extract unique elements from a string. import java.util.HashSet; import java.util.Iterator; import java.util.Set; import java.util.StringTokenizer; /** * * @author Animesh Pandey */ public class Main { /** * @param args the command line arguments */ public static Set getUniqueTokens(String str, String separator) { StringTokenizer tokenizer = new StringTokenizer(str, …

Member Avatar for NormR1
0
153
Member Avatar for nixufix

Hi, To start with I'm new to Java and this is my second project: to create a graphical TicTacToe game with MVC pattern. View and Control will be in the same class for this project. The goal is to learn about interfaces and to split your problems into seperate parts. …

0
272
Member Avatar for jackbauer24

My son found [this](http://www.sourceforge.net) website and wants to make his own project. This is what he has learnt:- * Inheritance * Serialization * GUI * KeyAdapter * Everything basic He also wants it to be iterative (version 0.1, only bones, ver 0.2 some updating etc). Could you suggest any programs …

Member Avatar for DavidKroukamp
0
137
Member Avatar for blackmagic01021

I want to create a message table, where every incoming message is saved as a row in a message. According to the picture below. Any introductory help will be very helpful. I already have á application where the messages are printed on a textarea, but for further inhancment I want …

Member Avatar for JamesCherrill
0
145
Member Avatar for blackmagic01021

I have a class that has a text area. the code is as follows package view; import java.awt.Font; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.ScrollPaneConstants; public class LabelStatus extends JPanel { /** * */ private static final long serialVersionUID = 1L; …

Member Avatar for blackmagic01021
0
169

The End.