35,618 Topics

Member Avatar for
Member Avatar for theurbanist

Hey Everyone, How would you go about writing a program that draws an image of an ice cream cone, using JFrame and JComponent classes, with a triangle on bottom and a circle on top?

Member Avatar for Akill10
0
112
Member Avatar for sitajaf

Hi, am trying to use a multicast socket in an application but I constantly get this exception; java.net.SocketException: error setting options. I have failed to find its cause and how to solve it. Pliz help (what could be causing it, and how can i solve it? thanx.

Member Avatar for sitajaf
0
203
Member Avatar for harshit99

i want to send mails to all those user who have logged in today at my website. by looking their last time of visit entries of the day in my database. i want the mails to be sent at a particular time like 11:30pm every day. how can i do …

Member Avatar for saduf
0
146
Member Avatar for ahmed_fawzy

why when i write this down : [CODE] private Statement getOrders_st=null; public ResultSet getOrders(String UserName) { ResultSet Rs=null; try { getOrders_st = Conn.createStatement(); Rs = getOrders_st.executeQuery("select order_history , ordr_date , ordr_total from orders where ordr_userid = '"+UserName.toLowerCase()+"'"); } catch(SQLException ex) { ex.printStackTrace(); } return Rs; }[/CODE] give NullPointerException at [CODE]getOrders_st …

Member Avatar for ahmed_fawzy
0
152
Member Avatar for kirit275

I want to load partial page when loaded in the same window ( i.e I don't want to load navigation menu bar again and again) but if someone opens it in new tab it should load the whole page(i.e including navigation menu bar) just like in facebook... I tried iframes(HTML) …

0
62
Member Avatar for george61

There is a working code about a program in which you should create differen Cat objects with name and color parameter and apply method to the objects. The problem is that I get the method working for only the last cat [CODE]public class Cats { public static String name; public …

Member Avatar for masijade
0
230
Member Avatar for M.Ovais

how we create a button using swing class..... I need help b/c I want to make a calculator but I am beginner and i dnt know swing class... Plz help me to create a button.....!!!!!!!1

Member Avatar for Eric Cute
0
63
Member Avatar for Tbusuk

Generally if we use <form action = "process.php">, this means that after the form is submitted, it will be processed to the file process.php in the directory. Mean while, in JSP, what is the meaning of <form action="<c:url value="/main"/>"> ? Because in the directory there is no main file or …

Member Avatar for peter_budo
0
181
Member Avatar for RicardoE

Hello, can you guys please sugest a way to have today date substracted 7 days, and have al of this 7 days into one String array? thanks.

Member Avatar for RicardoE
0
167
Member Avatar for 09tikimo

I really need help, my 1st assigment is due tomorrow and i've been working on it for a really long time and is just not getting it!!!! So please help me, it will be greatly appreciated. These are the questions that I haven't been able to figure out. Add a …

Member Avatar for Akill10
0
218
Member Avatar for Sparky_

Greetings, I am about 4 hours into JAVA and am making a big mess of it. Last night (at home) I installed the latest JAVA and NetBeans and got a "Hello World" Today I installed the 2 at work and am getting errors involving: "NoClassDefFoundError" (even with what worked last …

Member Avatar for ~s.o.s~
0
178
Member Avatar for WolfShield

I have a calculator program I am working on, it works except for one thing. When I type a large number into the calculator, say 125^4 it comes out with: 2.44140625E8. Any ideas on how to get this in-build function turned off? Thanks! -[b][i]WolfShield[/i][/b]

Member Avatar for bibiki
0
103
Member Avatar for caswimmer2011

Hello, I am trying to add audio files to my program. I am using a desktop application and not an applet. All the code that i have found online is for an applet. Is there a way for me to add audio code to a desktop application and not an …

0
96
Member Avatar for z00t

I'm trying to construct a rectangle & compute its area using the getWidth & getHeight methods.. but i cant figure out for to construct a freakin rectangle!! I keep getting the same error when i go to complie it.. no matter how hard i try :p "Cannot find symbol" [CODE]import …

Member Avatar for ajst
0
158
Member Avatar for oppie204

I need help making a code usig bluej to make a program that throws 2 dice for you and if you get a 2 or 12 you lose and a 7 or an 11 you win on the first roll only. And after that they have to roll the same …

Member Avatar for ajst
0
123
Member Avatar for FlavaK

[CODE] public class ProcessResults { private static int[] PayNum; private static String[] Surname; private static String[] FirstName; private static String[] DoB; private static String[] Dept; private static Scanner keyboard = new Scanner(System.in); private static int NumStaff; public static void main(String[] args) { final int MAX_STAFF = 10; PayNum = new …

Member Avatar for FlavaK
0
128
Member Avatar for warlord902

I configured a logger namely "My Log" in my main class which can write errors in a log file named mylog.txt Now I want to use this same file for all packages and classes there in. I tried to put this in other class Logger.getLogger("My Log") //Did nothing Now what …

0
131
Member Avatar for DragoDraco

I could sure use some help. Here is what I have and it shows a problem which is : int tempCelcius = (int)((Double.parseDouble(tempTextField.getText())) (5 / 9) × (Fahrenheit – 32)); and here is all that I have: /** * * @author TJ */ public class FahrenheitConverterGUI extends javax.swing.JFrame { /** …

Member Avatar for masijade
0
126
Member Avatar for zeni16

hi ... i am working on a tool using struts, here i need ur help, for following problem while i click on one tab(monitor) and select value in a combo box and go back on other tab(admin), den again if i come back on monitor page then i need to …

Member Avatar for zeni16
0
110
Member Avatar for Gsterminator

so i'm created a program that display the name and grade of students from a file, and also a boolean that checks to see if the names are in alphabetical order. The problem is that i've created a files that has a name in alphabetical order but it still returns …

Member Avatar for Gsterminator
0
143
Member Avatar for Poonam Mehta

hi i m doing thesis work and the title is to make a simulator for process schduling in any language. if anybody knows anything about it then plz help me.

Member Avatar for chadz mutia
0
141
Member Avatar for haribasker

[CODE]public void actionPerformed(ActionEvent ae) { if(ae.getSource()==clear) { tname.setText(""); tpass.setText(""); } else { if(ae.getSource()==Admin) { try { a=tname.getText(); b=tpass.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:vote"); Statement st= con.createStatement(); ResultSet rs; rs=st.executeQuery("select * from votelogin where tname='"+a+"'and tpass='"+b+"'"); while(rs.next()) { aa=rs.getString(1); bb=rs.getString(2); } if(a.equals(aa)&& b.equals(bb)) { JOptionPane.showMessageDialog(this,"INVALID USER.TRY AGAIN"); System.out.println("invalid user"); } else { JOptionPane.showMessageDialog(this,"VALID …

Member Avatar for naief
0
111
Member Avatar for Sparky_

Greetings - I'm new to JAVA. I'm using NetBeans. I've been going through tutorials and examples - with some frustration. Question - when I find an example / tutorial to attempt, how do I "create" correctly the setup before I simply paste the code? Meaning if the example has: [CODE]public …

Member Avatar for DarkLightning7
0
125
Member Avatar for basketball8533

Hey guys can you help me convert this code into java... i started a little... [CODE] def minEditDistR(target, source): """ Minimum edit distance. Straight from the recurrence. """ i = len(target); j = len(source) if i == 0: return j elif j == 0: return i return(min(minEditDistR(target[:i-1],source)+1, minEditDistR(target, source[:j-1])+1, minEditDistR(target[:i-1], …

Member Avatar for DarkLightning7
0
185
Member Avatar for javanoob101

Hello! I have to make a "Dice Applet" for school. It is all finished but the dice pictures do not display properly. It only appears in a line (not the full image.) But they seem to display fine if you maximize the applet then restore the applet to its original …

Member Avatar for javanoob101
0
132
Member Avatar for sirlink99

Hello Everyone. I am trying to use a string to set a color. i have tried Color is the string which says a color like black or red [code] g.setColor (Color.color); [/code] and [code] g.setColor (Color."color"); [/code] lets say the string color was red it should have this effect [code] …

Member Avatar for sirlink99
0
7K
Member Avatar for Neversleepin

Hello, in java, if we want to extract all values between 10 and 100, how could we express between in java. Is there any symbol like && || ..? Thank you

Member Avatar for Ezzaral
0
84
Member Avatar for LianaN

Hi! I need my own file extension for SWING desktop application (image processing tool). In fact, I want a user to be able to save locations of JLabel components on a screen. Please, give me a hint on how to implement this task. Thanks!

Member Avatar for LianaN
0
161
Member Avatar for Ankita B

Hi..I wish to prevent users from entering the web pages of my application again using back button once they've logged out.How can i achieve this?..I do not wish to use no-cache,history() etc as they're not fool proof. Also i want to know how can i prevent users from directly entering …

Member Avatar for jc364
0
920
Member Avatar for LianaN

Hi! I'm trying to create borders around JLabel components. However, the line [ICODE]c[i].setBorder(border)[/ICODE] cannot be compiled. Please, help me to improve this code. Thanks! [CODE] public void mouseReleased(MouseEvent e) { if (Menu.getgroup()) { Component[] c = getComponents(); Border border = LineBorder.createGrayLineBorder(); for(int i = 0; i < c.length; i++) { …

Member Avatar for LianaN
0
92

The End.