31,001 Topics

Member Avatar for
Member Avatar for fredy21

This is what I have in the main class: public static void main(String[] args) { final login login = new login(); login.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); login.setVisible(true); login.setResizable(false); login.btnEnter.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { login.inputText.getText(); new crosswordWindow().setVisible(true); login.dispose(); } }); } *there is a third class called login, where the jTextField is. The …

Member Avatar for Phaelax
0
173
Member Avatar for Search_not

I am currently busy working on an instant messenger program using the UDP `DatagramSocket` and `DatagramPacket` instead of the usual connection-based `Socket` and `ServerSocket`. I need the server-side of the application to check the online status of its clients. I have attempted doing this by connecting to the server using …

Member Avatar for Search_not
0
249
Member Avatar for Varunkrishna

How do I display the individual integers from the scanner input stream for example if the user enters 500 I would like to display it as 5, 0, 0. Here is the code guys import java.util.Scanner; public class Digit { public static void main(String[] args) { int number, i = …

Member Avatar for Varunkrishna
0
1K
Member Avatar for sameer.a.awan1

public void setState(String state) { if(state.length() <=3) this.state = state; else this.state = state.substring(0, 2); `}`

Member Avatar for Slavi
0
50
Member Avatar for TekknoDraykko

Hello All! I'm reviewing Java (SE, ver 8) and I'm using one of the "Teach Yourself Java..." books. I'm up to the chapter on Java Web Start and I'm stuck. I'm trying to run the sample app (a .jnlp file), but I get an error that reads: "Application Blocked by …

Member Avatar for TekknoDraykko
0
202
Member Avatar for jjones0150

Hello guys. Im having trouble figuring out why I keep getting an error saying the compier cant find my class. its all the way down at the end of the code called circle class. Any suggestions? package circle.pkg7.pkg2.app; import java.util.Scanner; /** * * @author Jay */ public class Circle { …

Member Avatar for stultuske
0
308
Member Avatar for sameer.a.awan1

import java.util.ArrayList; import java.util.Collections; public class PersonMaker { public static void main(String[] args) { ArrayList<Person> personAL = new ArrayList<Person>(); ArrayList<Address> addressList = new ArrayList<Address>(); Address c0 = new Address("2100 Pleasant Hill road", "duluth", "GA", "30096"); Address c1 = new Address("3392 fairway oaks", "lawrenceville", "Georgia", "30044"); Address c2 = new Address("4493 …

Member Avatar for stultuske
0
190
Member Avatar for Praveen_10

import java.util.ArrayList; import java.util.List; public class Task7 { static int count=0; String arr[]=new String[40]; /** * * @param list * @return an array consisting of vowels from the passed character array, * in the order they appear. for example, if list = {'t','h','e','s','a','u','r','u','s'}, * the method returns {'e','a','u','u'} */ public …

Member Avatar for JamesCherrill
0
144
Member Avatar for michael.james.90475

import java.awt.Frame; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.media.opengl.*; import javax.media.opengl.awt.GLCanvas; import javax.media.opengl.glu.*; import com.sun.opengl.util.Animator; import com.sun.opengl.util.FPSAnimator; public class Object3D implements GLEventListener, KeyListener { GLProfile glp; GLCapabilities caps; GLCanvas canvas; GLU glu; float rotX = 0.0f; // Rotate screen on x axis float rotY = 0.0f; // …

0
134
Member Avatar for Wei_3

My build.xml can run junitTest well but when I tried to build with cobertura instrument, JunitTest failed, Why? <target name="instrument" depends="compile"> <echo> ====== run target instrument ==== </echo> <!-- Remove the coverage data file and any old instrumentation. --> <delete file="${junit.dir}/cobertura.ser" /> <delete dir="${instrumented.dir}" /> <!-- Instrument the application classes, …

Member Avatar for Wei_3
0
937
Member Avatar for anandhachandru

can anyone say best way to convert java class file into java file appreciate for your help thanks

Member Avatar for anandhachandru
0
611
Member Avatar for alemojarro

I am trying to make a code that makes a random point cloud that changes every five seconds for a minute. I have it so that it makes the inital cloud, but I am stuck on how to make it change every five seconds. private class newCloud implements ActionListener { …

Member Avatar for JamesCherrill
0
92
Member Avatar for Sudhakar_1

<head> <!-- //In header section of the page add below url code: --> <!-- Sesion time out and session expiry url starts here --> <s:url id="sessionExpirePopUp" action="sessionOutCiscoGSS" namespace=""> </s:url> <s:set name='sessionExpirePopUpNew' value='#sessionExpirePopUp.replace("&amp;","&")' /> <!-- Sesion time out and session expiry url starts here --> <script type="text/javascript" language="javascript" src="<%=request.getContextPath() %>/jsp/js/jquery.js"></script> <script …

Member Avatar for stultuske
0
202
Member Avatar for Sudhakar_1

Hi. The Timer displayed is 1 hr (HH:MM:SS) in decrement order. I have to display a pop out when 50 mints complete after that remaining 10 mints one pop up should display saying 10 mints with 0 sec. After that for every 2 mintues the pop up appear showing 2minutes …

Member Avatar for stultuske
0
100
Member Avatar for jjones0150

I'm having trouble working these last few kinks out my progarm. It would be greatly appreciated if you can help me out from here. import java.util.Date; import java.util.Scanner; import java.io.FileReader; import java.io.FileNotFoundException; import java.io.PrintWriter; import javax.swing.JOptionPane; import javax.swing.text.BadLocationException; public class aCircle { public double circumference(double cRadius) { return cRadius; } …

Member Avatar for stultuske
0
227
Member Avatar for Newbiejavagirl

I am a newcomer to java and jdbc. I am currently trying to develop a web application in which the user can upload a spreadsheet to the form. Is there any way in which contents of the uploaded spreadsheet can be saved to the database? I am working in eclipse …

Member Avatar for JamesCherrill
0
94
Member Avatar for Zubenna

Please I need a java expert to help me with the code and algorithm that deletes duplicate element from an array. I have written a programm to do this as shown below using my own algpritm. Though it is working but I think my code is too long for this …

Member Avatar for JamesCherrill
0
321
Member Avatar for SkateX

Greetings, I'm working on a class project for fractions and I'm stuck and cannot figure out where to go from here. We have a mandatory driver file we aren't supposed to change. See below for example output and the output I am actually getting. **Sample Output** Enter numerator; then denominator. …

Member Avatar for Nutster
0
527
Member Avatar for durrat

I am using Eclipse helios and Android 4.1.2 i have followed the following documentation https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw and done the coding exactly as described in tutorial.when i run my app on emulator it shows "This app wont run unless you update google play services" but on real device which is sony xperia …

Member Avatar for Dhiru_1
0
2K
Member Avatar for happygeek

Addressing last weeks Securi-Tay conference hosted by the Abertay Ethical Hacking Society in Scotland, Stephen Tomkinson from the NCC Group detailed how Blu-ray players can do more than play videos; they can open up a new attack surface for the hacker. Tomkinson demonstrated a new tool that had been released …

2
402
Member Avatar for TekknoDraykko

Greetings! I'm reviewing Java, in an effort to enhance my programming skills. I'm utilizing the book "*Teach Yourself Java in 21 Days*" and I'm currently learning about Java Web Start. I'm not sure I full understand how I'm supposed to use Web Start (based on the samples in the book) …

Member Avatar for stultuske
0
282
Member Avatar for GingerDontCare

Hello everyone, I am a little stuck an this simple task. I have created an html with a form that has 2 user input boxes and 4 button +,-,*,/,. Basically a simple calculator. And I have a jsp to process the form. I am trying to now create a java …

Member Avatar for stultuske
0
539
Member Avatar for adnan_6

please check the following error while running the BluetoothLEExplorer.Droid project from http://developer.xamarin.com/content/BluetoothLEExplorer/. D:\robotics programming\ys u\BluetoothLEExplorer_2\BluetoothLEExplorer.Droid\obj\Debug\android\src\bluetoothleexplorer\droid\ui\controls\ScanButton.java(3,3): Error: error: no suitable constructor found for Button(Context,AttributeSet,int,int) super (p0, p1, p2, p3); constructor Button.Button(Context) is not applicable (actual and formal argument lists differ in length) constructor Button.Button(Context,AttributeSet) is not applicable (actual and formal argument …

Member Avatar for stultuske
0
271
Member Avatar for mubashar_1
Member Avatar for happygeek
-1
265
Member Avatar for hakeemtunde

I have being trying to implement GA in java. please ccan anyone guid me on how to go about implementing it for a school that offer 13 subjects with 8 periods per day for 5days. They have 7 staffs of which some of them teach morethan one (1) subjects and …

Member Avatar for hakeemtunde
0
172
Member Avatar for ali11

File f=new File("c:/'.'"); // I know about file class just didn't understand what kind of file "c:/'.'" is. File strRoot[]=f.listRoots();

Member Avatar for JamesCherrill
0
108
Member Avatar for garkle

I'm in an introductory programming class, and one of our assignments is to complete a Rock Paper Scissors program using nested switch statements First of all, this method might be completely wrong in the first place, but currently every time I compile it it says I'm missing a return statement …

Member Avatar for JamesCherrill
0
395
Member Avatar for Huseyin_1

I am new to java client and server and I have been given a task to complete which does the following below: Client: c1. Connect to server via a connection-oriented socket. c2. Read (from socket) and display the prompt message sent (see step s2 in server) by the server. c3. …

Member Avatar for David_50
0
346
Member Avatar for vijay90kk

scan through this API there should be a option for scan with OCR, means all content will save in database as a txt‏ Once scanning done that become a image‏

Member Avatar for peter_budo
0
114
Member Avatar for jim45682

Modify the Week Two Java™ application using Java™ NetBeans™ IDE to meet these additional and changed business requirements: The company has recently changed its total annual compensation policy to improve sales. A salesperson will continue to earn a fixed salary of $75,000. The current sales target for every salesperson is …

Member Avatar for jim45682
0
2K

The End.