31,001 Topics
| |
Hi I'm trying to make a website. But I need to make a syntax highlighting program that Categorize commands based on what they do. For example, when i type a code in C/C++ or Java on my site, the colors will become highlighted instantly. One group would be I/O, another … | |
/** * Help me to solve this one * * The input for input dialog should appear at right textfield * * ex. your firstname? >>> john * john should appear at the textfield label firstname */ import java.applet.*; import java.awt.*; import java.awt.event.*; import javax.swing.JOptionPane; public class Info extends Applet … | |
Hi there, I want to implement undo logic which deletes the last drawn shape. To test this logic i had cleared shapes list and redrawn all shapes but still **last** shape does not delete. public void drawAllShapes(Graphics2D g) { //draw all triangles for (DrawTriangle t : newTriangles) { t.drawTriangle(g); } … | |
Hello eveyone, Please tell me why triangle shape is redrawing on mouse move. It want triangle shape draw only once until mouse release. Here is my code below. Thank you ! public class Triangle extends JFrame { Point startDrag, endDrag, midPoint; private java.util.List<Polygon> triangles = new LinkedList<Polygon>(); Polygon triangle; public … | |
Hi there, I want to draw a triangle using mouse events like mousePressed(), mouseReleased() and mouseDragged(). But triangle did not show until mouse release. Please tell me what i am doing wrong that triangle is not showing in mouseDrag event. And one thing more, triangle is drawing upside down. Please … | |
import java.util.*; public class MainClass { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Products p1 = new Products(100,"Genius Keyboard",450.50,10); Products p2 = new Products(200,"Genius Mouse",480.00,10); Products p3 = new Products(300,"Monitor",5000.00,50); ArrayList<Products> list = new ArrayList<Products>(); list.add(p1); … | |
I am trying to create an HTML form which displays text from a text file, using a Java Servlet. I keep getting the following error: Error instantiating servlet class servlets.ReportServlet. Here is the HTML page: <html> <head> <title>TODO supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <form … | |
I am trying to create an HTML form which displays text from a text file, using a Java Servlet. I keep getting the following error: Error instantiating servlet class servlets.ReportServlet. Here is the HTML page: <html> <head> <title>TODO supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <form … | |
Hey guys, I am having trouble with keypress event for a button that I have. This button is programmed to do logoff operation. Now what i want is the solution or sample program in which if user is scanning the barcode of logoff then logoff event should occur.Please suggest solution … | |
hi So i made a simple game app, and am implementing music now i have easy and hard mode, and game over, as well as home screen homesecreen now plays music1, loops fine and all...then once player selects to play i want to stop the current music1, and start music … | |
Hello! I am developing a POS System. I have need to print Sales receipt. I have no physical printer to test my printing but i have print on xps document. I am facing a problem with indentation of my data on Sales receipt. Following is the code which i wrote … | |
In my Food Tab, I wanted to achieve this [Click Here](https://sfault-image.b0.upaiyun.com/358/064/3580648794-597611aa1f701) But I only able to get this [Click Here](https://sfault-image.b0.upaiyun.com/779/111/779111227-5976120f6955a) How can I increase the width of the JTextField which are in Food Tab ? Below is my code public class FoodOrdering { static private JFrame frame; static private JTextField … | |
I want to crop an image manually using the mouse. Suppose the image has some text, and I want to select some text from an image, then for that purpose I want to crop that area by using the mouse. | |
Hi all few free tutorial sites for beginners are given below. C PROGRAMMING http://learnermode.com/c-tutorial/ C++ pROGRAMMING http://cplusplus.com Java https://docs.oracle.com/javase/tutorial/ C# https://msdn.microsoft.com/en-us/library/aa288436(v=vs.71).aspx Python https://www.tutorialspoint.com/python/ Java Applets http://learnermode.com/java-tutorial/applets/ | |
Can anyone guide me to find a way to convert swing application to Android app. If we just create the gui using xml is it enough to take the working code from the previous swing application to run on Android | |
Hi Guys Im A Noob, so i need your kind perception on my code Im running A Table Anytime i do it i get this message Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not supported yet. And this is My Table Code: private void tablaLISTADOMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling … | |
[CODE] import java.awt.*; import javax.swing.*; import java.awt.event.*; class log extends JFrame { JButton b1=new JButton("ok"); JPanel panel=new JPanel(new GridLayout(2,2)); public log() { panel.add(b1); add(panel,BorderLayout.CENTER); b1.addActionListener(new ActionListener(){ public void actionperformed(ActionEvent ae){ JPanel pan=new JPanel(); JFrame frame1 = new JFrame(); JButton b2=new JButton("ok"); pan.add(b2); frame1.setVisible(true); frame1.add(pan); frame1.setSize(250,100); b2.addActionListener(new ActionListener(){ public void actionperformed(ActionEvent … | |
could someone please take a look at this and let me know how to fix it. What I would like to happen is when the dropdown option is selected it displays the buttons for that option. and then when the button is clicked text set for that button displays in … | |
How to convert a swing based application to Android application | |
Hello. I'm doing a lab assignment and I have several subclasses extending the base class. I'm not sure how to "override" the methods and implementations in the supers, because every time my driver class calls a method on my subclass, the superclass method gets called. Heck even within the subclass … | |
I wonder how to handle exception in `ResponsesEntity`. When it receive wrong url, it supposes to go to the `catch` block and display the `log`. But I keep getting error message in console. The `try-catch` not working as it not display log message. @GetMapping("abc/{Id}") public ResponseEntity info(@PathVariable("Id") String id) { … | |
| |
Greetings, Can anyone tell me why my loop does not actually add anything for interest? I'm thinking it is because of the way my interestRate variable is setup as a class variable (static). Here is the code snippets /**************************************************************************************** HNUnit4Ch13Investor.java xx All variables should be declared private Declare a class … | |
Hello, First off, i did try looking around the forum but i couldn't understand. Here's a few question which i need help with: 1) (adding node at head) i don't know how does the head will hold the reference to the next node, the code is like this: [CODE] //at … | |
In this assignment you are to write a program that finds a path through a “maze”. The maze will be represented by a 2-dimensional array of ints. You will be given a starting point in the array that consists of a pair of ints <x,y>. In this pair, x represents … | |
Greetings, I have been trying to figure this out for hours with no avail. Basically I need to print out user input as Initial value, ASCII(char), ASCII(int), and Hex. I can get everything to work however I am not supposed to have the char values print if its a digit, … | |
Hi! I have made a desktop application which is running perfectly. But i am facing problems with jframe size on different machines. I have monitor of 'Gateway'. I am satisfied with my jframe size on my screen . But when i shifted it on laptop of 'hp' company then my … | |
hi ! I am developing a pos software for desktop. I am using java derby database for this. I have developed a feature for purchasing items and also a feature for analyzing purchases so that the user can view that what, when, how much he purchased. I am using two … | |
Hi! I am developing a pos for a store. I have created a settings window. On this window there is a button which is used to set a name for store. When user press this button a message dialog appears with a text field and a OK button so that … |
The End.