3,978 Topics

Member Avatar for
Member Avatar for Ayoub_1

so i am working on this table that have buttons combobox and checkbox... i did all of that and i am left whit one this i button that can add a icon in IMAGE column in the same row her is my main private JTable tb; private String[] comboData = …

Member Avatar for JamesCherrill
0
306
Member Avatar for kayleigh0411

I am trying to make a calculator, but I can not seem to figure out how to get the = operation to work. Everything else seems to be working fine, but I am just really struggling with the =. Any guidance in the right direction would be super helpful! import …

Member Avatar for JamesCherrill
0
1K
Member Avatar for ahmed alnaseri

Hi guys, I am trying to add a new component to my window by clicking on a clickable jLabel. Better said, with mousevent. Unfortunately, it does not work, at least for what i tried with. Can you help me here? My code: package test_1; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; …

Member Avatar for JamesCherrill
0
214
Member Avatar for Violet_82

HI guys, as mentioned in my revious post, I'll redo my wordCount application using the GridBagLayout approach. The functionality of the application hasn't changed at all: I've only removed the various Jpanels and, for simplicity, used only the JFrame and attached all the comonents to the JFrame. I've had a …

Member Avatar for Violet_82
0
1K
Member Avatar for noobjavacoder

Can someone help me figure out why is this not working..... The program supposse to take the data i load into the hashmap from the file and look for the user enters. and suppose to output the answer based on the case. thanks import java.io.File; import java.util.HashMap; import java.util.Scanner; import …

Member Avatar for stultuske
-1
160
Member Avatar for LibraryCode

Hi i have a question how do i update database ,once i press on the field it gets active for adding :here is my form : ![DisplayRecord.png](/attachments/large/4/7e05003e5ddcb9618f811af6be38b532.png "align-center") And here my code so far ,i try to code the update button,but it does updates the field,but not the database. package …

Member Avatar for stultuske
0
304
Member Avatar for noobjavacoder

OK, so i do have a perfectly good working code but im trying a different way and its bugging me why its not working. any help would be much appreciated. the program suppose to list all the available directories and then ask the user which directory he's searching for, takes …

Member Avatar for Taywin
0
245
Member Avatar for wateryman96

Hello guys, so im new to programming, but i've been given task by my school to create a simple games(flappy bird clone) in Java Console, without using java swing. my only help would be a library called Enigma. my concept are simple like this character=*, pipes=I can anyone give some …

Member Avatar for rproffitt
0
48
Member Avatar for destiny_2

I'm looking to get back in to help desk support and have been out of the loop for five years. Is there some place out there that I can find a community to help me get back in the swing of things? TIA

Member Avatar for Dani
0
608
Member Avatar for Doogledude123

I'm used to using AWT's Canvas and BufferedImage and things like that. I've switched from using Canvas for drawing, to using a JPanel and I'm blown away by the efficiency. I intend on fully using Swing for all of my GUI. My question is, what is Swing's equivalent of BufferedImage?

Member Avatar for JamesCherrill
0
150
Member Avatar for LibraryCode

![jframe.png](/attachments/large/4/0b8af77defcb3e49ffd02bbff7d6281f.png "align-center") Here is the jframe above,images selected at random,the task is after image is displayed,choose from jcombo the answer,press submit and display in jtextfield below the answer:"Correct" or not.And untill the submitt button is not pressed ,disable the next button.How would i do this logic? So far i have …

Member Avatar for JamesCherrill
1
758
Member Avatar for EarhawkPH

i have this problem about the betting system of my game. Here's the scenario: Your money: 300 Your bet: 300 JOptionPane appears: "you have insufficient money to bet" Here's the code for the main program: /* * To change this license header, choose License Headers in Project Properties. * To …

Member Avatar for JamesCherrill
0
437
Member Avatar for LibraryCode

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package my.GeographyQuiz; import java.awt.*; import javax.swing.*; /** * * @author K00190164 */ public class GeograpgyQuiz extends javax.swing.JFrame { …

Member Avatar for Traevel
0
196
Member Avatar for shayan_doust

Dear all, I was given a project to write a software that would track contracts. Everything is successful until I read or write the current data from the JTable to the textfile. This also happens when I read the textfile and insert the data into the JTable. The exception I …

Member Avatar for Traevel
0
491
Member Avatar for shayan_doust

Dear all, I was told to write an application for my assignment that would keep track of contracts. The problem is, I have no clue how I can make this application write JTable into txt file every 5 seconds and wheever application would open, it would read the txt file …

Member Avatar for JamesCherrill
0
563
Member Avatar for Aditya0025

hello i m writing a program in which i try to write on the frame by mousemotionlistener and mouselistener methods till now i did the writing part and i i want to start that writing by clicking the button Ok then another frame is open in which i can write …

Member Avatar for Aditya0025
0
451
Member Avatar for Sloane_1

I'm a tad confused on a homework assignment. I'm supposed to write a program that displays a table of the Celsius temperatures 0 through 20 and their Fahrenheit equivalents. I got the loop to work just fine, but I'm supposed to display the results of the loop in a TextArea …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Jeanyl_1

Hi there, I am having a problem in running my frame at Java Eclipse. It always says unkown source when clicking the button. I would like to insert the dat to the Jtable but it always display like this ` ## This is the error: ## Exception in thread "AWT-EventQueue-0" …

Member Avatar for JamesCherrill
0
403
Member Avatar for EarhawkPH

I'm doing a quiz game using netbeans. I've already done the randomization of questions. The problem is, how do i keep a question from repeating itself? ex: chose correct answer --> questionrandomizer comes in --> next question appears but it's the same question earlier here's my code: package kiddiequiz.scienceforms; import …

Member Avatar for Stefce
0
268
Member Avatar for mjayyy

I have to display the mortgage payment amount and then list the loan balance and interest paid for each payment over the term of the loan but my output isn't changing. import java.text.DecimalFormat; import javax.swing.JOptionPane; public class MortgagePmt { public static void main(String[] args) { int term; //Term in years …

Member Avatar for mjayyy
0
1K
Member Avatar for jim3472

I have a samsung 320gb HDD. Recently i am fatching a boot failour. I am trying to give windows. But a massage swing "a disk error occourer" and can not reboot pc. Can anybody help me?

Member Avatar for mindmergepk
0
196
Member Avatar for Brandon Hatch

I have a problem with a project i'm working on, and I was wondering if it was possible to do what i'm thinking. Basically I have a simple mathematical GUI. I want it to take 2 inputs multiply them and output the answer. I am doing this all through the …

Member Avatar for Brandon Hatch
0
235
Member Avatar for EarhawkPH

**I'm using netbeans btw if you notice the long code for the GUI** I'm doing a quiz game. The questions are randomized. My problem is, the randomized questions do not appear on the questionLabel (JLabel Variable). I don't know what to do. Help? /* * To change this license header, …

Member Avatar for EarhawkPH
0
177
Member Avatar for shahera.arafat

hii ^_^ I have a problem which is I have to delete a book when( I enter it's name and then press the delete button) and that book has been saved as an object in an array of list, and then written to a (txt )file.. once I press the …

Member Avatar for shahera.arafat
0
223
Member Avatar for hadisur_rahman

# PLEASE some one help me to explain the code. This code is for a ScientificCalculator # package calculator; import java.math.*; //@author Hadisur Rahman public class ScientificCalculator extends javax.swing.JFrame { private boolean zerodisp; private boolean decdisp; private boolean dgrrad; private boolean sh; //sh means =shift private byte op; private double …

Member Avatar for stultuske
0
327
Member Avatar for Saboor880

Hello to all! I made a small project using Netbeans8. I named my project smallCalcApp. And then i add a new JFrame File in my project and in that file I handled events of components which i put on form. When I run that file , it ran successfully and …

Member Avatar for stultuske
0
353
Member Avatar for happygeek

So I was recently at the big Motorola launch event which spanned New York City, Mexico City, Sao Paulo and London where I was part of the media herd waiting to see exactly what new handsets were about to be revealed. The answer came in triplicate: the Moto X Style, …

1
937
Member Avatar for 47pirates

I'm trying to give access to client computer from my server and also tryin to revoke the granted access... the grant is successful but the revoking is not working please help. hms is the satabase that i want to give access to my clients.. my code try { Connection con …

Member Avatar for stultuske
0
1K
Member Avatar for hermela_1

this is a code for an input window that takes in data from users i tried to save whatever data the user put in in axml file but it is giving me errors...what is wrong with it...help /* * To change this license header, choose License Headers in Project Properties. …

Member Avatar for stultuske
0
1K
Member Avatar for jonsan32

I'm having trouble applying the javascript necessary to close one set of sub-menus when another set is opened. The tutorial site provided some demo code that works, but I can't get it to work without displaying all the various buttons to activate the other available skins. Up top is the …

0
235
Member Avatar for sirlink99

Hello Everyone, I am experiencing errors when trying to compile a project in Java 8. The errors are caused by swing components. The code I am using is the following: import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; public class Main2 { public Main2(){ JFrame f = new JFrame (); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setSize(100, …

Member Avatar for JamesCherrill
0
1K
Member Avatar for nataraja833

Hello , Can anyone give me an efficient way to do Rect/Polygon filling as below/Attachment . ![Patterns.png](/attachments/small/3/13ab1a68a958648cc9313476241adfb2.png "align-left") ![Patterns.png](/attachments/large/3/13ab1a68a958648cc9313476241adfb2.png "align-center") as of now I'm drawing lines & single pixel rectangles to do this and my application has slowed down so I'm looking for an alternative . This is an extension …

Member Avatar for nataraja833
0
489
Member Avatar for Ahmed_62

i have this code to make sodoko board with 9*9 cells(button cells ) but i cannot made all Jpanels contain my buttons i made the first Jpanel only import java.awt.Color; import java.awt.GridLayout; import java.lang.reflect.Field; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.JButton; import javax.swing.JPanel; public class Sodoko extends JFrame { private Sodoko() …

Member Avatar for JamesCherrill
0
231
Member Avatar for sam_7

I will be implementing MVC model in my program but before that, I have done a simple program based on my understanding of the MVC model. I have three pages: - The user will enter a value in page one and click the next button. - The value will be …

Member Avatar for JamesCherrill
0
272
Member Avatar for rohtashrathore

Hi All, I have a problem in my jdialog(child) and the parent frame is jframe,it is taking two events to close the jdialog,both from the close caption available at the upperright corner of the dialog,as well as from the button add where i have used dipose() to close on single …

Member Avatar for mKorbel
0
257
Member Avatar for sam_7

my confirm button action listener is not printing the username and password even though I added a Actionlistener for it. please help thanks. Codes LoginDialog.java import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; @SuppressWarnings("serial") …

Member Avatar for sam_7
0
394
Member Avatar for Saboor880

HI to all frndz! I have started learning Java and in a case study I have got some errors I have written a class address book and an error is occurring due to following code snipet persons.add(p); and the error message is: "Address Book has tried to run an unchecked …

Member Avatar for JamesCherrill
0
163
Member Avatar for ali11

Hi I am trying to move JTabbedPane down below top panel.I want it where the bottom panel begin.Thanks. import java.awt.*; import javax.swing.*; public class GridBagLayoutTest { JPanel bottomPanel; JPanel topPanel; public GridBagLayoutTest() { JFrame frame = new JFrame("GridBag Layout Test"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLocationByPlatform(true); JTabbedPane tabbed=new JTabbedPane(); tabbed.add(bottomPanel,"One Way"); tabbed.setBounds(12, 200, 20, …

Member Avatar for JamesCherrill
0
196
Member Avatar for sciwizeh

Hello All, I'm trying to write a simple html editor that will highlight tags, and it does, but if the user types the caret jumps to the very end of the document, how can I stop this from happening? here's my code: [CODE=java] import javax.swing.*; /** * Main frame for …

Member Avatar for reguieg
0
349
Member Avatar for ali11

Hi I am creating a program in which I have 2 tabs. I want to make my tabs bigger in size so they can take whole panel space. Is there any way I can make both tabs size bigger. thanks import java.awt.*; import static java.awt.Font.BOLD; import java.awt.event.*; import java.awt.event.*; import …

Member Avatar for JamesCherrill
0
2K
Member Avatar for PixelandtheWolf

Many of you probably have read about [Google's announcement](http://googlewebmastercentral.blogspot.com/2015/03/an-update-on-doorway-pages.html) on Doorway pages. Whether or not this ranking signal has come into full swing yet is debatable, but regardless, I'd prefer to be pro-active if anything occurs. For those of you who don't know what a Doorway page is, [VolumeNine did …

Member Avatar for iamrichard
0
332
Member Avatar for sam_7

I read http://www.java2s.com/Code/Java/Swing-JFC/ProgressBarDemolongtask.htm on how to do a progress bar and up to now, I am still at a loss of how to implement one progress bar. say I have I have 4 functions that stores some random text into a text file -function a stores the text in textfile …

Member Avatar for JamesCherrill
0
181
Member Avatar for ali11

Hi i am trying to make taxi meter which shows the current price.Rightnow I have to click startmeter afterevery 1 minute than it's update the new price but I want it to update automatically once the price change after 1 minute instead of me pressing startmeter everytime.thanks for your help. …

Member Avatar for stultuske
0
149
Member Avatar for spud91

Hi Guys I have a program thats supposed to generate 9 random objects made from lines and then allow me to save the panel showing the state of all 9 objects. Currently all 9 objects are being generated and when i click save the panel is being saved to a …

Member Avatar for JamesCherrill
0
404
Member Avatar for Mike1986

Hi I did a Simpletron program in GUI interface, but when I want to print the instructions in the window, it will not be as I want to. I used JGrasp to run the program and it just prints the instruction after each and not the way I wrote it …

Member Avatar for JamesCherrill
0
471
Member Avatar for janetheath

Hi, I am getting this error and just can not figure out what is causing it. I have looked at code from 2 different books. I have google searched. Here is part of my program that contains the code giving me problems. I posted the program from the beginning to …

Member Avatar for JamesCherrill
0
6K
Member Avatar for shahera.arafat

hello everybody ^^ I have to make a calander ,and to let the user to insert any event ! the calander it self is working <<but I don't know how can I write the code to give the user the ability to enter a new event by entering some fields …

Member Avatar for shahera.arafat
0
146
Member Avatar for Pobunjenik

So I'm building this pretty simple top trumps card game as part of an assignment. I have the game logic built, the swing GUI is in place and I plan to do all the calculation on the server app and have it update the client up with the game's state, …

Member Avatar for Pobunjenik
0
688
Member Avatar for Goldfinch

** I was building a program that is supposed to paint an image in a JPanel. I should be able to select an image (such as a JPEG) from the Open item in the File drop down menu and then it should be visible in a new window. However, the …

Member Avatar for Goldfinch
0
201
Member Avatar for kxjakkk

I'm trying to make a program that removes all occurences of a specified string from a text file. I'm having trouble with tying in everything to make it work, so that the user is prompted to enter a string. This is what I've got: import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; …

Member Avatar for JamesCherrill
0
458

The End.