32,199 Topics

Member Avatar for
Member Avatar for Nandomo

DatagramSocket SERVERSOCKET = new DatagramSocket(9999); byte[] receiveData = new byte[2000]; while (true) { DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length); SERVERSOCKET.receive(receivePacket); String LINE = new String( receivePacket.getData()); InetAddress iPAddress = receivePacket.getAddress(); int port = receivePacket.getPort(); } Ok I have this right now, I have been googling, yet I do not know …

Member Avatar for Nandomo
0
393
Member Avatar for sk8ergirl

hi, I have gui with layered pane and four buttons two buttons are above the layered pane and the two buttons are at the left side of the layered pane.the user can controll the size of the GUI but the proplem is that the buttons size doesn't change I want …

Member Avatar for JamesCherrill
0
128
Member Avatar for sonam281

hello,my code is below mention, bt in this my eraser button doesnt show me any cursor in drawpad.. thanxxx in adva import java.awt.BasicStroke; import java.awt.Color; import java.awt.Cursor; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Point; import java.awt.RenderingHints; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.MouseAdapter; import …

Member Avatar for JamesCherrill
0
279
Member Avatar for kumararvind003

How to print xls or xlsx file to printer in java ? Is there any API or any reference ?

Member Avatar for Ewald Horn
0
88
Member Avatar for murali2489

Dear All, I am reading Generics, below method is confusing. It clearly mentioned in the Method parameter that it should accept only List. But when i give ArrayList as Argument it compiles. It should be only List right? eventhough Arraylist is an implementaion class. below is the code PLease explain. …

Member Avatar for murali2489
0
235
Member Avatar for wallet123

It is relaed to the thread i posted a while ago. Before I edited the model of my table, it was working properly, but when i added some columns thats when the problem came out. Everytime i click the button that will open this window, it goes blank. Only a …

Member Avatar for wallet123
0
350
Member Avatar for mahabelg

public static String DecBin(int nbr) String resultat=""; String decbin=""; //String temp; int rest; //temp=""; while(n/2>0) { rest=n%2; //temp=temprest; String rest1=Integer.toString(rest); resultat=resultat+rest1; } for (int i=resultat.length();i<resultat.length()-1;i--) decbin=String.valueOf(resultat.charAt(i)); return resultat;

Member Avatar for stultuske
0
192
Member Avatar for Doogledude123

Alright, so I have been coding a Ceasar Cipher in Java and I have the encrypting working, However, I cannot seem to find my problem decrypting. Here is the code, I thought just by revearsing all the operations it would decode it, but that doesnt seem to be the case. …

0
120
Member Avatar for wallet123

I am planning to create a table where everytime i add a row, a checkbox inside the table will also be created, will that be possible? And i am using window builder. If it is possible, can you give me some instructions how to do it? I did my research …

Member Avatar for JamesCherrill
0
319
Member Avatar for java786

Write a program that simluates a game of dice. In this game, players take alternate turns rolling two dice. On each turn, they record the sum of the two dice and add this to their total. If a player rolls a doublet (both dice have the same value), then the …

Member Avatar for mathijs
0
4K
Member Avatar for Dadi_2

I have recently shifted from c# to try Javafx2. I am also new to this forum. I have been stuck trying to implement internal frames in Javafx. I stumbled upon this link: http://stackoverflow.com/questions/17673292/internal-frames-in-javafx I have managed to add jfxtras 8 jar file to my project as well as in scene …

0
184
Member Avatar for Ankit_8

import java.awt.*; import java.applet.*; public class Neko extends Applet implements Runnable { public static void main (String args[]) { Image nekopics[] = new Image[9]; Image currentimg; Thread runner; int xpos; int ypos = 50; public void init() { String nekosrc[] = {"right1.gif" , "right2.gif" , "stop.gif" , "yawn.gif" , "scratch1.gif" …

Member Avatar for Ankit_8
0
185
Member Avatar for mgold

I'm trying to implement an algoirthm descirbed here: http://pub.uni-bielefeld.de/luur/download?func=downloadFile&recordOId=2497720&fileOId=2525546 The purpose of that algorithm is to create a concept hierarchy based on a document corpus. For instants, a "Dog" concept would be a child of the "Animal" concept in such a hierarchy. To the point, I've come accross a peice …

Member Avatar for sepp2k
0
278
Member Avatar for rgkrish183

this front page: Form.jsp <html> <head> <title> Data Inserting Form </title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> </head> <body> <h1>ENTER THE EMPLOYEE DETAILS</h1> <form action="./Insert.jsp" method="post"> <table cellspacing="5" cellpadding="5" border="5"> <tr> <td align="right">Employee Name:</td> <td><input type="text" name="EmployeeName"></td> </tr> <tr> <td align="right">Employee_id:</td> <td><input type="text" name="Employee_id"></td> </tr> <tr> <td align="right">Nationality:</td> <td><input type="text" name="Nationality"></td> </tr> …

Member Avatar for peter_budo
0
403
Member Avatar for pspwxp fan

I am using NetNeans I have a JPanel that is supposed to show some already input data along with a progress bar while the remainder of the program carries out some lengthy processing (about 1 minute long). Once the processing is done, this same JPanel is supposed to be updated …

Member Avatar for JamesCherrill
0
561
Member Avatar for dlmagers

I think I have a cluster of a mess here and was wondering if someone could help me in the right direction. I am trying to write a small program that will calculate the gain and/or loss of the sale of stock. The program will ask the user for the …

Member Avatar for stultuske
0
438
Member Avatar for Stefce

Hello, im trying to get the answers from the secound array but it takes just the last question and answer hers is the code: search.setOnClickListener(new View.OnClickListener() { String[] questions = { "http", "arp", "asd" }; String[] answers = { "HyperText Transfer Protocol", "Advanced Research Project", "asdasdasdasdasdasdasdasd." }; @Override public void …

Member Avatar for stultuske
0
142
Member Avatar for pwolf

I have just started trying to learn Java, and i am currently following a tutorial series on youtube([Java tutorial by Derek Banas](http://www.youtube.com/watch?v=rGlJiUO-dZA)) it seems like a good series so far! but i have been going along with him and typing it out, then afterwards replacing my copied code with his …

Member Avatar for Ewald Horn
0
282
Member Avatar for murali2489

Hi Team, Im reading Collections. It is mentioned that while intialising priority queue, it uses natural ordering by default. But my output is not like that. Below is my code and output. public class BackedCollections { public static void main(String[] args) { PriorityQueue<Integer> pq = new PriorityQueue<Integer>(); pq.offer(3); pq.offer(1); pq.offer(5); …

Member Avatar for murali2489
0
4K
Member Avatar for Violet_82

Hello, I have looked at an example of `GridBagLayout` (JamesCherrill you must be thrilled : - )!!) and there are a few things that are not entirely clear to me. First here is the code taken from deitel and deitel “Java how to program”, chapter 25: // Fig. 25.21: GridBagFrame.java …

Member Avatar for Violet_82
0
204
Member Avatar for maricar_1

create aprogram that will identify seat plan for an airplanewith availables columns and 20 availables rows.

Member Avatar for JamesCherrill
0
84
Member Avatar for prakash2813

Hello friends. I am having problem with displaying japanese characters into eclipse console. I use eclipse IDE. And I have two properties files. one for default english text, and second has japanese text. which is not correctly displayed when normally opened. I have used ResourceBuilder and Locale class (JDK 6 …

Member Avatar for prakash2813
0
297
Member Avatar for screenedcreamy

on click of an href i want to build a dynamic link and open the same in a new browser window using java. out.append("<A href="displayLinkDetails.do"/>Sample Link</a>"); (i want be able to send parameters as part of the action) currently the control is in java file. As im using a seperate …

Member Avatar for Ewald Horn
0
154
Member Avatar for MxDev

hi guys, iam workin on an application that calculate the income for certain diving centers, i using the SQLite database, i developed a database with 3 table the first one for user input, the second is to hold daily income, and the third for weekly income. i've a problem when …

Member Avatar for takonewa
0
2K
Member Avatar for murali2489

Hi Team, I am working on Collections and in order to Sort ArrayList of Objects of a Class based on their instance variable, it is mentioned in book that I need to OverRide CompareTo Method. compareTo Method works fine but Iam not getting the clear idea of its sorting logic. …

Member Avatar for murali2489
0
336
Member Avatar for vinay.pradeep.1

Hi Friends, I am working as a programmer in one bangalore based software company, interested to get some freelancing website projects. Plz suggest any firm that provides projects(software development & website development) to work from anywhere or any site that i can get freelancing work to do. I can handle …

0
39
Member Avatar for islam-morad

Hello guys, I'm workin on an application that is supposed to be generating certificates. Here are the steps: 1- input certificate data 2- generate certificate number 3- create the certificate and save its data in the database i have a table in the database which will hold certificates. The database …

Member Avatar for islam-morad
0
196
Member Avatar for r.nair3456

hi, its like this i did c++ at my school level for almost 2 years....its been 6 years since i have done any programming.....due to college studies......now i want to move to android development......for that i need to learn core java(j2se).....its been one month i have been doing j2se.....covered oops,classes,objects,inheritance,excepti... …

Member Avatar for Schol-R-LEA
0
311
Member Avatar for Siddharth_4

I have just upgraded my web application from spring version 3.0 to spring 3.2.6. I am using Maven, DWR 2.0.2 and Spring AOP in this web application. All my configuration is XML based, I am not using annotations. When I upgraded my configuration files to spring version 3.2.6. I faced …

0
84
Member Avatar for Santosh_5

I am trying to add new spinner below old one dynamically with click of a button. Also, I am adding button on the side of spinner dynamically. My problem is the spinners and buttons are added on top of each other. How can I add new spinner at the bottom …

Member Avatar for peter_budo
0
1K

The End.