35,618 Topics

Member Avatar for
Member Avatar for 9w43

Hello, I have a class named Time and when I run it I can enter the time, increase the hours and minutes, the minutes and hours will stored in their fields. I have another class called TimeTest, when this class is running, it needs to display the test results of …

-1
88
Member Avatar for absk

I have this Java program which gives an output that runs into 10000s of lines. I use Windows. When I run the program in cmd, It doesn't show more than around 500 lines, how do I see all my output?

Member Avatar for absk
0
78
Member Avatar for Narvind Pise
Member Avatar for matt01986
0
34
Member Avatar for Stefano Mtangoo

Hi all, I need to draw simple lines on JFrame/JPanel. What is the easiest method to go? Also what do I need to display an image on JFrame/JPanel Thanks

Member Avatar for Stefano Mtangoo
0
5K
Member Avatar for lidyaMikhail

hello i have a python chat server (multi client) and i wanted to connect a java client to it but i have been searching alot about java-python connection and i got solutions like using APIs as YAML or SOAP but i just can't figure out which one or if there's …

0
50
Member Avatar for ucas

Hi. I need some help. That's a snippet of the class. [code=java]public constructor ( ChooserListener callback ) { // that's a constructor super(); Loader.load(); this.callback= callback; JFrame frame = new JFrame(); frame.getContentPane(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(this); frame.setSize(300,330); frame.setVisible(true); JPanel lectures = new JPanel(); String items [] ={BLANK,COMP,EIMC,MATH}; JList list = new JList(items); …

Member Avatar for cale.macdonald
0
86
Member Avatar for Izzywizz

The program needs to read an excel file that contains a list of data (a list of students, thier module mark, student ID) The data needs to be presented in the following format: User ID : Name : Module ID : Mark The program also needs to have a menu …

Member Avatar for cale.macdonald
0
871
Member Avatar for Ashwin Vasnai

I am writing a code which gives different colors to key works. I have written following code which will compare with key word say "ABC" when ever it finds "ABC" it will make it into blue color else red color.I am not getting whats wrong in my code. private void …

Member Avatar for Ashwin Vasnai
0
119
Member Avatar for amit.hak50

Create 2 Thread classes.One Thread is Incrementor and has one variable cnt1 with initial Value 0. Incrementor thread increments value of cnt1 by 1 each time. The other thread is Decrementor which has variable cnt2 with initial value 100. Decrementor thread decrements value of cnt2 by 1 each time. - …

0
75
Member Avatar for MxDev

Hi guys, I've a problem to import the jar file "[I]JFXBuilderRT1.jar[/I]" into [B]NetBeans 6.8RC1[/B]. I tried by add it to libraries, but with no good. Could someone tell me what to do??? Thanks [EL-Prince]

0
50
Member Avatar for EddieC

Tired of parsing all the source code involved in building mobile apps? Or perhaps the approval process for Apple's App Store is getting you down. Or maybe you're an aspiring commercial developer in search of the next must-have platform to tap. If you think Android might be the one, then …

0
194
Member Avatar for vtsmokey88

The program is suppose to run through a list of strings. The stings are then put through a hash function (which works fine) and then "hashed" (for lack of a better word). The index is suppose to be an array of linked Lists to handle collision problems. I guess the …

Member Avatar for yokartik
0
176
Member Avatar for KSM899

Hi, I have 4 classes , 1 is the base class and the other inherts from it, it worked fine when compiling .. I tried to make them as a package , it works fine with the superclass but it doesn't with the other classes, It always gives me cannot …

Member Avatar for ~s.o.s~
0
124
Member Avatar for mini programmer

who can I read the RUN ? Hi to all . I now start learning the java language . I have this program : [CODE] import java.util.*; class WTime { public static void main(String[] arguments) { GregorianCalendar now = new GregorianCalendar(); int hour = now.get(Calendar.HOUR_OF_DAY); if (hour < 12) System.out.println("Good …

Member Avatar for ~s.o.s~
0
112
Member Avatar for xxPoseidonxx

Alright, well I am getting the ".class expected" error. I cannot figure out what it is nor is google helping much either. [code] public class Driver { public static void main (String[] args){ Scanner scanIn = new Scanner(System.in); Deck deck = new Deck(); Card[] hand = new Card[5]; Shuffle shuffle …

Member Avatar for shubhinetwork
0
114
Member Avatar for Stefano Mtangoo

I always love to learn programing via Music/video players once I grasp the basics. How easy it is to do it, especially using windows DLLs or even Java libraries :) Thanks

Member Avatar for Stefano Mtangoo
0
86
Member Avatar for 2scoopdelux

i am having trouble putting together all the pieces of the puzzle to work together in harmony. My final project is simple,i have a jlabel with the question of how much does your dog weigh, I have a button and a jtextfield, the user enters the amount of there dog, …

Member Avatar for 2scoopdelux
0
189
Member Avatar for vtfan

I have a poker game that mostly works. When I run the program, the players only get Flush and Straight Flush hands. [CODE=syntax] public class Card { private String face; private String suit; public Card(String cardFace, String cardSuit) { face = cardFace; suit = cardSuit; } public Card(Card c) { …

0
72
Member Avatar for HazardTW

I did make some attempts to search for this problem but was not sure exactly what to search for and being after 1AM my eyes wouldn't take reading through the 11+ pages of unrelated search results, so I will just ask the question... New to Java, want to use one …

Member Avatar for HazardTW
0
138
Member Avatar for 9w43

Hello, I am using Blue J, I have 3 classes, time, date and patient. When I run the patient class, I can put patient details like name, address, DoB, time. The time and date classes are separate classes, how can I store the date (int) and time which I enter …

Member Avatar for mellowmike
0
175
Member Avatar for vtfan

I made a poker game and when I run it I get these errors... [CODE=syntax] Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at PokerGame.Hand.getPairs(Hand.java:82) at PokerGame.Hand.whichHand(Hand.java:28) at PokerGame.DeckOfCards$1.actionPerformed(DeckOfCards.java:67) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) …

Member Avatar for vtfan
0
227
Member Avatar for vikasj

Hi, I want to display data which i have entered through form(html or jsp) into database. I have a servlet and a bean with a function of database retreival. I have got one attribute value in servlet through session transfer into bean's method to retrive data with respect to that …

Member Avatar for peter_budo
0
67
Member Avatar for bryan69

hi, ive got a final year project to do. its lik monitoring if any data leakage is happening on the network/system. would like to enquire if is it possible to do such a system using java? thanks.

0
66
Member Avatar for Kriogenic

Hey Everyone, I am seeming to be in a spot of trouble. I am using the following code to read a HTML page, loop through it line by line. problem is it is around 7300 lines and takes about 20 seconds to finish the loop. I was wondering if anyone …

Member Avatar for Kriogenic
0
86
Member Avatar for ucas

Hi. I need some help. Below is given a snippet of Java code. [code=Java]deptList = new JList(deptName); add(new JScrollPane(deptList)); deptList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); deptList.addListSelectionListener( listSelectionListener); } ListSelectionListener listSelectionListener = new ListSelectionListener() { public void valueChanged (ListSelectionEvent e) { if (e.getValueIsAdjusting()== false); callback.tell(dept[deptList.getSelectedIndex()]); } }; [/code] When you run it, it creates 2 windows. …

0
41
Member Avatar for vishnu_1984

I am consuming a webservice which takes in 10 parameters. The aim of the call to the webservice is to obtain a Task ID.All the parameters for the call are supplied from a JSP page(using JSF). The following is the web service call [CODE] return mySoap.addTaskToProject(ticket, projectId, srcLangId, tarLangId, componentId, …

0
112
Member Avatar for dahliababy

[code] package squishgame; /* * The player class allows for a player to be created with: * a name * a location on a grid (0-10, 0-10) * * The player can move North, South, East, or West but will not move off the * grid (must stay within (0,0) …

Member Avatar for JenniLei
-1
101
Member Avatar for divyaatonline

i am creating a simple web application using a tomcat project.My problem is that "The welcome file specified in the web.XML" is nor reading Content fo my we.xml is [code=xml]<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>admissions</servlet-name> <servlet-class>admission.AdmissionServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>admissions</servlet-name> <url-pattern>/admission</url-pattern> …

Member Avatar for peter_budo
0
75
Member Avatar for jrmugz

Greetings, Below is some code where I am trying to connect to a sub organizational unit in the AD. I am not sure the syntax to use. For the line expireOU = "Need to specify the sub OU here." what should I add there, if, say, the parent OU is …

0
38
Member Avatar for emcee123

The End.