3,978 Topics

Member Avatar for
Member Avatar for bops

Hello. I am having a little trouble with enabling and disabling word wrapping in a normal edit control. [CODE] hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL, 0, 0, 100, 100, hwnd, NULL, GetModuleHandle(NULL), NULL); // This is how my …

0
100
Member Avatar for dylgod

I am trying to write a code that reads an integer and then diplays a diamond with the corresponding number of lines. The program I have written displays a solid diamond, but I am only trying to display the outline. Here is my code: [CODE]import javax.swing.JOptionPane; /** *Odd and even, …

Member Avatar for NormR1
0
94
Member Avatar for dreamweaver75

I have this program I have to write that calculates the volume of a pool and then displays the results along with how much water is needed to fill the pool and the cost to fill the pool if the cost is .77 cents per cubic foot plus a one …

Member Avatar for jon.kiparsky
0
187
Member Avatar for dylgod

I am writing program that will eventually calculate the speed of sound though a medium using the switch function, but am unable to get it to read the numbers I input, here is the code if anyone can offer some pointers. [CODE]import javax.swing.JOptionPane; /** *This program calculates the time it …

Member Avatar for tong1
0
112
Member Avatar for tong1

/* The following programs are written to guard the input. The input is requested as an non-negative integer.Is there other method to do so? */ /* Operation on DOS window: "PositiveInt1" receives a positive integer only. */ import java.util.*; public class PositiveInt1{ static int factorial(int n){ int fac=1; if ((n<0) …

Member Avatar for NormR1
0
129
Member Avatar for zaxxon216

I am not sure what is going on, for some reason the page will not display at all on ie7 or ie8, Firefox works fine. Please help thanks [URL="http://popnwedlock.com/services.html"]http://popnwedlock.com/services.html[/URL] [CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Pop N' Wedlock Services</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="pop_style.css" rel="stylesheet" …

Member Avatar for zaxxon216
0
140
Member Avatar for angellove40

//I am just practing java in vacation.So i tried to create JFrame with Events Handling //But getting error .Also i want to know that when i click submit button the new frame //appear and the old frame must get disappear .PLS help import java.awt.*; import java.awt.event.*; import javax.swing.*; public class …

Member Avatar for NormR1
0
216
Member Avatar for kefeir

[code]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class fahrenheitPanel extends JFrame { { } private JLabel JLCelsius, JLFahrenheit; private JTextField JTFahrenheit,JTCelsius; private JButton Convert; private ConvertButtonHandler cHandler; public fahrenheitPanel() {//the constructor JLCelsius=new JLabel("fahrenheit",SwingConstants.LEFT);//creating the JLabels for celsius JLFahrenheit=new JLabel("Celsius",SwingConstants.LEFT);//creating the JLabels for fahrenheit JTFahrenheit=new JTextField("0");//crealting the textfield for fahrenheit JTCelsius=new …

Member Avatar for NormR1
0
252
Member Avatar for g2gayan

Hey ! :) Below is my code for a about page ! i need to load a image instead of suing drawString to draw the image ! :icon_redface: what i need to do is to load a jpg and center it to screen ! can any1 help me to modify …

Member Avatar for g2gayan
0
139
Member Avatar for rogue005

I am doing a project using Java swing in Netbeans and I am using their in-built GUI generator thing. I have created a socket in one frame and i need to use the same object in another frame. these frames are present in the same package but are different classes. …

Member Avatar for Ezzaral
0
3K
Member Avatar for joe'g

hi am trying to code a program that uses a panel that has a functional calculator in it, and the calculator can be re-sized using a slider. here is my code please help me out import javax.swing.*; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; public class CalcInSlider extends JPanel{ JSlider slider; …

Member Avatar for NormR1
0
125
Member Avatar for joe'g

am trying to make a menu with a frame en its not working. and how can i introduce multiple panels in the same frame? here is my code. import java.awt.*; import javax.awt.event.*; import javax.swing.*; public class FrameMenu extends Jframe{ private final Color colorValues[]={Color.YELLOW,Color.RED,Color.BLUE,Color.GREEN}; private final Color colorValues2[]={Color.GRAY,Color.CYAN,Color.MAGENTA,Color.WHITE}; private RadioButtonMenuItem colorItems[];//color …

Member Avatar for Jayavardhan
0
111
Member Avatar for joe'g

am trying to make a menu with a frame en its not working. and how can i introduce multiple panels in the same frame? here is my code. [CODE]import java.awt.*; import javax.awt.event.*; import javax.swing.*; public class FrameMenu extends Jframe{ private final Color colorValues[]={Color.YELLOW,Color.RED,Color.BLUE,Color.GREEN}; private final Color colorValues2[]={Color.GRAY,Color.CYAN,Color.MAGENTA,Color.WHITE}; private RadioButtonMenuItem colorItems[];//color …

Member Avatar for stephen84s
0
145
Member Avatar for har58

hi,i m getting the following excption,though i hv properly set the classpath ,,, i m able to rum other programs,,,, plz help,,, [CODE] Exception in thread "main" java.lang.NoClassDefFoundError: admins (wrong name: a dmins/admins) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 1) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at …

Member Avatar for stephen84s
0
1K
Member Avatar for aryowap

How to change this applet to swing? [CODE]import java.applet.Applet; import java.awt.*; import java.io.PrintStream; public class Hounds extends Applet { public String getAppletInfo() { return "Hare and Hounds"; } public String[][] getParameterInfo() { return parameterInfo; } public void init() { String s = getParameter("bgColor"); try { BG_COLOR = s != null …

Member Avatar for jon.kiparsky
0
190
Member Avatar for rlhh

[CODE]package ATM; // ATM.java import javax.swing.*; public class ATM { private boolean userAuthenticated; // user authentication private int currentAccountNumber; // current account number private Screen screen; // JOptionPane (pop-up(s)) private CashDispenser cashDispenser; // virtual cash dispenser private DepositSlot depositSlot; // virtual deposit slot private BankDatabase bankDatabase; // account database private …

Member Avatar for rlhh
0
2K
Member Avatar for har58

Exception in thread "AWT-EventQueue-1" java.security.AccessControlException: acc ess denied (java.util.PropertyPermission oracle.jserver.version read) hi, i m building an online examination application. The code is getting complied .but it throws an exception.Below i m pasting d code as well as exception.plz help me. It is a simple program for login. It matches d …

Member Avatar for har58
0
946
Member Avatar for tldorr

I need some assistance with my calculator code. I have developed a fully funcitoning mortgage calculator up to this point. I have one small change that I want to do. Right now this is considered an applet and I want it to be considered an application. It is my understanding …

Member Avatar for NormR1
0
403
Member Avatar for the reporter

i have to filter the user input in the comboxbox under my "search tab" eg. if the user were to type "y", "YAHOO" or any words related to "y" will appear on the filter list and allow the user to select. anyway my combobox values are taken from text file …

Member Avatar for Darryl.Burke
0
1,000
Member Avatar for ekofo

Hi clecer people! I am new can i have a little help here please. I wanted to mcuh the name and password of employee, entering and exiting the building ( it works but not completely) The task Implement a system that restricts which members of staff that have access to …

Member Avatar for NormR1
0
120
Member Avatar for SHARKASI

i've just 3 days to give the full program to the doctor but i've a problem and i'm tired to find this problem could anyone help me to fix it please this program is currency converter the code is here: import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax.swing.event.*; import javax.swing.Icon; …

Member Avatar for jon.kiparsky
0
212
Member Avatar for Jay V.

I am at my wits end with this code. I've been working on it for at least 2 weeks and the same error appears. The error, itself, is the incompatible types error. It appears underneath the division symbol. [CODE]// DivideByFive.java - This program determines if a number is divisible by …

Member Avatar for kashokreddy14
0
151
Member Avatar for 1314abc

i try to compile and run seems like work perfectly but once i click the "add" button(something like save) error come out i dont know what problem with the codes [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* …

Member Avatar for Taywin
0
112
Member Avatar for paul ince

Hello, I am quite new to swing, and I was trying the JFrame component, when this exception occurred , just when I tried to instantiate the JFrame object. It says the following: [code=java] Exception in thread "main" java.lang.NullPointerException at JFrameDemo.main(JFrameDemo.java:8) [/code] and line 8 is the following [code=java] JFrame frame …

Member Avatar for Stefano Mtangoo
0
955
Member Avatar for chinee

i am trying to get the input the info so when the choices are chosen and submit is clicked the info is seen for the flower order but getting errors. if you read it you would probably get what i am trying to say but how to get it without …

Member Avatar for NormR1
0
317
Member Avatar for Victor C.

Good evening, I am having a little trouble with the outcome of my bucket list assignment. Everything seems to be working just fine, but the final outcome isn't up to par. When you enter numbers from 1-30 or 61-99 it goes into its proper place, however numbers enter in the …

Member Avatar for NormR1
0
176
Member Avatar for imag1ne

My objective is make a game program for my cs class. So my game is like this: You input a word and then input another word which starts from the last letter of the first word. The program check if the word has been used before and if the last …

Member Avatar for Taywin
0
148
Member Avatar for DoEds

Arg... Guys can you correct my code? 'coz it gives me a wrong output if i input "3 , 1, 2 or 1, 3, 2 or 3, 2 ,1" [CODE]import javax.swing.*; public class OutputGreatest { public static void main(String[] args) { int uInput1,uInput2,uInput3; int maxValue; uInput1 = Integer.parseInt(JOptionPane.showInputDialog(null,"<1>Input a number …

Member Avatar for DoEds
0
126
Member Avatar for nettle4k

Hi, I want to draw a rectangle but I want a user to specify its dimensions. Currently, I have 4 JTextAreas that take x, y, width and height values. I also have a button. I know how to display those values etc but I don't know how to link them …

Member Avatar for nettle4k
0
171
Member Avatar for bluejamesbond

First off, I am new to this forum so please forgive me for any traditions that you all usually keep that I haven't kept. Currently, I am a java programmer, but I am recently trying to learn scheme for a project. In terms of java swing, can someone explain to …

Member Avatar for bluejamesbond
0
186
Member Avatar for Bewitched

I got this to run but it will not display the final result. It ask for C or F then the temp degree but will not display the conversion. The process just completes. Any ideas? I am new here.... Thanks My project::-/ [CODE]import javax.swing.JOptionPane; public class Assign8_Cheshire { public static …

Member Avatar for pi_lord12
0
180
Member Avatar for SashaC

I am creating a GUI calculator. When I enter amounts and press submit, negative infinity appears in the monthly payment area instead of the dollar amount. I'm not sure what is causing the problem. My code consist of three files: the GUI, calculation, and text file. GUI [code] import java.awt.*; …

Member Avatar for NormR1
0
238
Member Avatar for Dzero

I cannot figure out how to get my icon to display, or get the GUI to flip through my array object. i have many errors that i cannot solve. i hope some one can help me. here is my code. [code] import javax.swing.JFrame;//imports java's JFrame component //----------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------- //Main Class …

Member Avatar for NormR1
0
221
Member Avatar for SashaC

I have two issues with my code: 1.When I run the code the components of the GUI are very large. I have attached a screen shot of what it looks like. I'm not sure how to change the size. I've tried using: nameOfButton.setSize(12,12); but that doesn't work. 2. I'm new …

Member Avatar for JamesCherrill
0
180
Member Avatar for stark025

Hi. I am a student, and I have an report to do for our Computer Programming Fundamentals class. We are required to demonstrate the use and function of constructors and the JOptionPane class. I have implemented a simple age calculator using Java as my demo, and I intend to go …

Member Avatar for NormR1
0
222
Member Avatar for khunmato

Hello! I have constucted a code for the card game 21. The code uses inputDialogs to "talk" the the player. I thought my shool assigment was over by doing just that...I was wrong, our teacher dumped a new bomb on us. With these kind words; [I]Develop task 5 (Twenty-one card …

Member Avatar for JamesCherrill
0
2K
Member Avatar for chinee

i created a flash screen but all i could get is a blue screen not even the picture is comin up and not even the menu is coming up.and plus there are errors from place order to change order with the variable and the equal sign. so can any one …

Member Avatar for NormR1
0
250
Member Avatar for Derrin

Hello everyone and thanks in advance for your help. I am having trouble with a piece of java code for class and have asked the insructor for help and he has only helped in confusing me further. The assignment was due Sunday and I have been in the hospital since …

Member Avatar for JamesCherrill
0
178
Member Avatar for Rajnesh

I was creating a chat application in Java Swing/Socket Programming. The same when I created in non GUI app. it worked [url]http://www.daniweb.com/code/snippet448.html [/url]. But in GUI, they can't connect now. I have tried it thru many ways but still m getting errors for connection. Can anyone can help me...... /********************* …

Member Avatar for anthonydonx
0
260
Member Avatar for chinee

I don't understand why my labels are not coming up when i run the code are the JComboBox to big or what? [CODE]import javax.swing.*; //import javax.swing.AbstractButton; import java.awt.*; //import java.awt.event.ActionEvent; //import java.awt.event.ActionListener; public class floralOrderGUI { JButton submitButton = new JButton("Submit"); public static void main(String[] args) { new floralOrderGUI(); //system.exit(Q); …

Member Avatar for NormR1
0
90
Member Avatar for chinee

i am trying to extend a splashscreen window ti 15 minutes can anyone help. [CODE]import java.awt.*; import javax.swing.*; public class flowerOrder extends JWindow { private JProgressBar bar; private JLabel ImageHolder; private ImageIcon myImage; private int i; public flowerOrder(){ setBounds(60,60,600,600); //set location and size of the window getContentPane().setBackground(Color.BLUE); //set the background …

Member Avatar for chinee
0
122
Member Avatar for Brandon515

ok what i'm trying to do is make a pong game in an applet. here's my code: [CODE]//<applet code = Pong width = 800 height = 600></applet> import javax.swing.*; import java.awt.event.*; import java.awt.*; import com.bruceeckel.swing.*; public class Pong extends JApplet implements KeyListener { int px1 = 770, px2 = 20, …

Member Avatar for NormR1
0
108
Member Avatar for asad_80

Hi, I am writing a program to change the image of the button when it is clicked and image gets replaced to the original image when the button is clicked again. Have used array of button to do this. I have used integers whose value will continue to change as …

Member Avatar for NormR1
0
102
Member Avatar for abbyo

I'm having problems figuring where I need to go next in this project to create an applet from this application... any suggestions where I should start (in layman's terms)? [CODE] import javax.swing.*; public class storageSP { public static void main(String[] args) { //declare variables float res; String kfilm; String sfps; …

Member Avatar for NormR1
0
218
Member Avatar for Hunter2379

Ok so i'm writing a chat program. My problem is that let's say i write something in the client or server, you only see it once you write something again. How do i make my program refresh it's self? (so it prints things in real time.) Thank You Client Code: …

Member Avatar for NormR1
0
294
Member Avatar for amit.hak50

When i clicked on JMenuitem ..it opens a new window ..but when i close this window the parent window also closes... is there any method to resolve ..i don't want to close the parent window only the new window..

Member Avatar for amit.hak50
0
275
Member Avatar for SHARKASI

I'm having trouble finding a problem in this program that supposedly converts currencies, is it possible to find some help from specialists in the Java programming language ...? the codes here: import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; import javax.swing.event.*; import java.io.* ; public class CurrencyConvertor extends JFrame { …

Member Avatar for SHARKASI
0
200
Member Avatar for amit.hak50

Hi My problem is that , The Jframe window does not remember it's position after minimizing ....suppose I minimize at co'ordiates (45,89)..but after maximizing it again open at (37,28)..means at different co-ordinates ..i want that jframe should open at the same position...after maximizing..like remeber it's position.. please help

Member Avatar for NormR1
0
784
Member Avatar for 1314abc

i just show the code [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * NewJFrame1.java * * Created on Jun 26, 2010, 9:54:49 PM */ import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * * @author THKFC …

Member Avatar for 1314abc
0
162
Member Avatar for asad_80

Hi, I have written a program where i have used array of 4 Buttons as i click on any of the buttons it image changes and on re-clicking the same button it images changes back to the original image.It is working alright but the issue is that the image which …

Member Avatar for NormR1
0
96

The End.