36,051 Topics

Member Avatar for
Member Avatar for idlackage

I have a method that takes in a rectangle shape as a parameter, uses it as a selection box, and finds shapes in an array called shapeObjects that are within the bounds of the selection box. The indexes of those shapes are then added into a new array which is …

Member Avatar for javaAddict
0
97
Member Avatar for arash_khazaei

Hi, I am currently working on curling game for my High School assignment and i have lots of files of code, so i doubt anyone will want to look through them. Im having an issue in which, i have a JPanel and when i call the paintComponent (Graphics g) of …

Member Avatar for masijade
0
110
Member Avatar for Felikim

Hi guys; Am stuck on the following piece of code which is meant to delete obsolete files in a directory in an sms server. It runs well from a windows platform on which it was coded in, but can not run from a linux platforrm correctly. On the linux lastmodified …

Member Avatar for tmanohar
0
337
Member Avatar for ngoelnoi

I am using a Multi column JTextPane. Everything is working fine but I also want to add some space after each column in JtextPane to improve the readability of the text in the Jtextpane. In my current project, it is unable to differenciate between text of two columns. I am …

Member Avatar for ngoelnoi
0
153
Member Avatar for mohamed mo'men

[code]package taskvip; import java.util.Random; public class Main { public static void main(String[] args) { int y =0; Random t =new Random (); fun1 e = new fun1(); for ( e.i = t.nextInt(50); e.i < 100; e.i++) { e.A[e.i]= e.k.nextInt(50); y=e.k.nextInt(); } for ( e.i = 0; e.i < 100; e.i++) …

Member Avatar for mohamed mo'men
0
410
Member Avatar for nsutton

I want to make a smarter child program. Smarter Child incase you don't know was an aim bot that was designed for kids. It was extremely abused but it had pretty good AI and comprehension of what your type. I don't really know how on this. I would probably be …

Member Avatar for nsutton
0
171
Member Avatar for prathamesh_pita

Hi, I have my website Developed in JSP. It is just a basic , Which only uses menu's & Database Connection to display Dynamic Data. Can i migrate this JSP code to Asp.net, is there any tool Available which will help convert it? As my website contains many pages, i …

Member Avatar for finito
0
81
Member Avatar for DrApe1

For my Programming class I have to write a program to get the Date and time from a Daytime protocol server. If you don't know, the format for the Daytime protocol is as follows: [code]JJJJJ YR-MO-DA HH:MM:SS TT L H msADV UTC(NIST) *[/code] YR being the last two digits of …

Member Avatar for aspire1
0
132
Member Avatar for rythreion

[code]import java.io.*; public class BaseTransform { private final BufferedReader buffer=new BufferedReader(new InputStreamReader(System.in)); public BaseTransform(){ try{ System.out.print("Enter any integer: "); int input=Integer.parseInt(this.getInput()); System.out.print("Enter a base[2...16]: "); int base=Integer.parseInt(this.getInput()); String answer=this.transform(input,base); if(answer!=null){ System.out.println(""+input+" at base "+base+" is "+answer+"."); }else{ System.out.println("Error!"); } }catch(Exception e){ e.printStackTrace(); } } public static void main(String args[]){ BaseTransform …

Member Avatar for peter_budo
0
96
Member Avatar for jet101

I'm currently working on a web-application project right now and I shifted from PHP to Java. Im new to JSP, JSTL and JavaBeans but I dont have problems compiling and working with them and actually enjoying. what I want to ask if I still need to learn Servlet? Im beginning …

Member Avatar for jet101
0
170
Member Avatar for zeah

Hi, I am building a searchengine which searches some html and text files in the web directory. I was trying to use lucene. I was able to index the file and query a word and get the documents which contains that search word. But the problem i was incurring is …

0
54
Member Avatar for mitch9654

This button will only appear if you move your mouse over it. See here: [url]http://mitch9654.zymichost.com/Java/index.html[/url] You hava to move the mouse around the top left my applet is this [code] /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package …

Member Avatar for mitch9654
0
103
Member Avatar for DrApe1

I realize this is an extremely low level java problem, but I've been searching and searching and I can't figure out a way to take two characters and combine them into one string. Particularly, I have a char array and I need to take two particular elements out of it …

Member Avatar for DrApe1
0
123
Member Avatar for san_fran_crisko

Hi, I'm trying to get Java to remove a JLabel from a JPanel whenever a button is clicked. Unfortunately it won't do this. I've tested my code and the button click is working for sure, so its the code to remove the component that is acting up. If anyone could …

Member Avatar for peter_budo
0
5K
Member Avatar for aashishdaniweb

I want to send email using JSP. I did this for that, 1. Downloaded and Installed Java and Tomcat on My PC. 2. Used the following script, [CODE]<html> <head> <title>JSP JavaMail Example </title> </head> <body> <%@ page import="java.util.*" %> <%@ page import="javax.mail.*" %> <%@ page import="javax.mail.internet.*" %> <%@ page import="javax.activation.*" …

Member Avatar for Hakoo
0
188
Member Avatar for Tyrone.Wilson

I want to develop a landscape design layout tool. it would be a CAD program of sorts but would need to look more aesthetic. at the end of it, it would need to look almost hand drawn. trouble is I am a bit of a noob having only developed a …

0
69
Member Avatar for mayank.15

Im trying to run my java application, but after some time it automatically stops and throws OutOfMemoryException: Java heap space. Now when i try to run it using (say) (-Xmx allocates the maximum heap memory) java -Xmx2000m [AppName] then it says Error occured during initialization of VM Could not reserve …

Member Avatar for mayank.15
0
180
Member Avatar for leiger

Basically I've got a text editor which revolves around a jTextArea. There are some settings (e.g. whether line wrap is enabled) that I'd like to save to a file when the application closes, and then load up again when it runs next. I've spent a few hours trying to get …

Member Avatar for leiger
0
201
Member Avatar for DeadSoul

[QUOTE] Hello friends i have tried my code to get the values from the database n display it in JTables but i am getting two errors.please help me. [/QUOTE] [CODE] import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JButton; import javax.swing.table.AbstractTableModel; import java.awt.Dimension; import java.awt.Component; import javax.swing.BoxLayout; import java.text.MessageFormat; …

Member Avatar for DeadSoul
0
7K
Member Avatar for zango

So my coding is a temperature converter. I have gotten everything down the way that it is wanted by the assignment except for one part. When I run the program, put in a value and select the radio button for conversion, no output ever shows up. Was hoping that someone …

Member Avatar for zango
0
743
Member Avatar for aravchr

Hello please help with these, i want to pass a value in input box to another jsp page without submit button. can i doit cheers

Member Avatar for jwenting
0
92
Member Avatar for rmsagar

Hello, I have a code which has public void run() and I have no problems compile the code. When I try to execute the class file I get an error Exception in thread "main" java.lang.NoSuchMethodError: main. Does the command line execution needs main() ? Is there a way to execute …

Member Avatar for JamesCherrill
0
217
Member Avatar for litchi

Hello :) I am working on a CRUD app to directly change a MySQL database on a remote server. I have a section where I can edit or delete entries. I choose an entry from a JList (populated by a ResultSet in a loop), and a JTextArea populates with the …

Member Avatar for litchi
0
164
Member Avatar for Lordson60

So i am working on a game, and i have a string value, and 3 integer vales, that i would like to save, so when you close the program, and then re open it, if you type in the string value, you will have you integer values. How do i …

Member Avatar for jwenting
0
91
Member Avatar for mohamed mo'men

there is Inheritance mean subtype polymorphism or there not have same job ??

Member Avatar for xonglennao
0
63
Member Avatar for vishal18

Hi Dear to All, I want create & write into excel file. My problem: when we get table as a query result on GUI. If user want to write that table into excel file,it should be done after button click. If we create it on server side then we may …

Member Avatar for xonglennao
0
116
Member Avatar for lich

i need to lock a label positions so that it wont move during a event. when there is a event happens that label is moving from that particular position. is there any solution for this

Member Avatar for xonglennao
0
413
Member Avatar for johndoe444

Say I have 2 columns of data. I want to display headers like "hour(24 hour)" and "Power(KW)" and then followed by a number of rows with 2 columns(hour and power). The hour should be under "hour" header and properly aligned and similarly for power. I want that all the data …

Member Avatar for quuba
0
109
Member Avatar for lse123

I think my jar to work needs mail.jar plus the others class files what to do? subject:javax.mail.Message I used jar cmf SMTPClient.mf SMTPClient.jar SMTPClient.class SMTPClient$SendAction.class SMTPClient$UpdateListener.class [B]mail.jar [/B]SMTPClient.java but gives (how include another jar in my jar and keep package structure?) [CODE] C:\Users\User\Documents\TextBooksDataFiles\Java Network Programming, 3rd Edition\jnp3examples\examples\19&gt;jar cmf SMTPClient.mf SMTPClient.jar …

Member Avatar for lse123
0
241
Member Avatar for spartanace

Hi guys I need help getting an event from a button in one class, so that i can act upon it in my other class. Because the class that invokes the class that has the buttons in it is the outer class, it has no access to the buttons on …

Member Avatar for BestJewSinceJC
0
104
Member Avatar for DrApe1

Okay so I'm making a basic spellchecker. I'm using a relatively small dictionary with about 1000 of the most common english words, all on separate lines in a text file. I'm on windows so I can't use the Linux dictionary. Anyways, It's not working. And I'm not quite sure why. …

Member Avatar for DrApe1
0
123
Member Avatar for ceyesuma

I have a JDesktopPane that opens and with a login it will add an InternalFrame with the InternalFrame 'innerclass'. The problem is that when I want to add another InnerFrame to the desktop I can't call the inner class to add an Internal frame because it wants me to login …

Member Avatar for ceyesuma
0
113
Member Avatar for swati.n

Hi I have to display 4 BufferedImage in jsp page.I am getting these images from a java code. In the jsp page i am using: ImageIO.write(demo.getBuffImage(), "png", response.getOutputStream()); With this i am able to get the image. However if i write different ImageIO.write(....) for displaying each of the 4 images, …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for asad_80

Hi, I have to make a program containing 52 Buttons having icons on them and have to attach action listener so that each button could function independently. Have used array in this program and have also been able to attach action listener with the array of buttons. Action Listener works …

Member Avatar for jwenting
0
155
Member Avatar for RaulGonzales

How i can build Pagination in JSP/Servlet [B]Design in MVC[/B] I don't know about Pagination Concept. Please give me the example code. Thank You

Member Avatar for ~s.o.s~
0
134
Member Avatar for sciprog1

Hello Members, I have a java file (myapplet.java), the myapplet.class file and the myapplet.html file. I would like to run this applet on my webpage. I use IE 7.0 The myapplet.html and myapplet.class files are both in the public_html folder of my UNIX account,which happens to be on the school …

Member Avatar for stephen84s
0
169
Member Avatar for Lordson60

so i am creating a game, and what i would like to happen is if you type a string value into the "create new" 5 integer values will save. fi you type a string into the "Username" the 5 integers will be read and put back into the file

Member Avatar for javaAddict
0
63
Member Avatar for mayank.15

I am working on a project in which i have to crawl through a number of *.jsp files and index some data from them. These files contain links to other jsps and .wav files. However, these links are of the form $root_dir$/<%=language%>ABC.wav, there language is a variable defined in the …

Member Avatar for jwenting
0
130
Member Avatar for johndoe444

I want to know how to check gracefully whether 2 sets are distinct or has at least 1 element in common. I don't want to find the common elements. Just knowing whether there is intersection or not is sufficient. May be I can do this using retainsAll but it changes …

Member Avatar for ~s.o.s~
0
124
Member Avatar for johndoe444

[CODE] Set s = new HashSet(); if (s.retainAll(anotherSet)) { ... } [/CODE] now it anotherSet is null the code is showing nullPointerExcpetion. How can I make retainAll work whether anotherSet is null or not?

Member Avatar for ~s.o.s~
0
66
Member Avatar for idlackage

Labels would not show up in the output window. The red highlighted code is where said labels get added to the window. I can't tell what's wrong with the code and I've looked at it over and over. [CODE]import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JButton; import java.awt.BorderLayout; import java.awt.GridLayout; …

Member Avatar for idlackage
0
241
Member Avatar for jakx12

So I have a boolean representation and inside that representation contains shapes. All the points of the shape must be true in the boolean array. For some reason its not putting the points on the array. Here is my code, please help me! [CODE] for (int d = 0; d …

Member Avatar for leiger
0
125
Member Avatar for Phoenix_7

this is my first time on this board, so hi. :p I'm currently learning basic java in college and I need some help. I have a constructor for my Node class and I've linked 3 string nodes together and I need to print them in order. So far I got …

Member Avatar for Phoenix_7
0
122
Member Avatar for karanits

Hello everyone. I have a question. In a servlet, can we write something on page using [CODE] PrintWriter out=response.getWriter();[/CODE] ,then clearing the page and then also forward the request using [CODE]RequestDispatcher rd = request.getRequestDispatcher("/some jsp page"); rd.forward(request, response);[/CODE] I was trying to do this but for some reason forwarding part …

Member Avatar for karanits
0
110
Member Avatar for pratz

I have just started learning python, I am a Java programmer. I think python is more simple than java. What I wanted to ask is, where is python used? And if python does not follow the complete OOP concepts, then can it be used to design large / major applications? …

Member Avatar for snippsat
0
249
Member Avatar for RaulGonzales

How i can Rewrite URL JSP in Apache tomcat same MOD Rewrite in PHP [U][B]EX.[/B][/U] [CODE]test.jsp?id=1 as test/1[/CODE] Thank You.

Member Avatar for RaulGonzales
0
113
Member Avatar for mahdi68
Member Avatar for newbie2010

Hello everyone, i'm trying to use 2 mootools scripts together in one source. They work serperately but as soon as i combine them only one is working. It seems they interfere with each other but i can't seem to find the problem. Can anyone help me out? I'll paste them …

Member Avatar for CrazyDieter
-1
301
Member Avatar for adity

I have a JTable as a leaf node of a Jtree. But though I can select each row in the table I cannot select each cell element. Please HELP! Adity

Member Avatar for javaAddict
0
88
Member Avatar for gordonrehling

[QUOTE=varunnanda;1173601]Thanks you very much, I am oblized.[/QUOTE] I'm very new to Grails, so hopefully this isn't blind leading blind! Below is the environment entries from my datasource.groovy dev works ok against memorydb prod works ok against MySQL running on a server with the noted IP address However, I can't get …

Member Avatar for gordonrehling
-1
225

The End.