All Questions
20 questions
0
votes
0
answers
218
views
Java using AWT list and sockets to send a direct message in a chat room
I am using Java sockets to create a simple chat room and using AWT component for the GUI. I have all functions of the chat room working, it sends and recieves messages to/from all users, etc... One ...
-2
votes
2
answers
45
views
AWT: I am trying to learn Java and was unable to understand the following program
What is "new MyCanvas()" in f.add(new MyCanvas());
How did we get the oval even though the paint() method is not called either in CanvasExample class constructor or in the main() method
What is new ...
0
votes
1
answer
808
views
Cast jzy3d.canvas to awt.component
I need cast the jzy3d canvas to java.awt.component, I want to display the chart in my frame with JCombobox and button but when I want to cast canvas to component, the program was dropped. Thank you ...
0
votes
1
answer
460
views
Set size of java element using AWT
I am new to java. I have started learning java 1 day ago.. I am background of c++ (not very good 1 year of intermadiate exp). In java we have started Gui programming. So i would like to ask you how ...
0
votes
1
answer
139
views
Refresh custom container through a button inside it in Java
Good morning,
I have a class that inherit from java.awt.Container. His scope is to wrap a list of Files showing them vertically as a "file name Labels + delete Buttons" list.
files are shown ...
0
votes
1
answer
203
views
Java not focusing any component
I use a c1.setFocusable(false) so that my Checkbox c1 is not focused as shown in the pic and after that, focus goes to the next Checkbox c2, I use again c2.setFocusable(false) and it continues to all ...
0
votes
1
answer
190
views
Java printer api
I want develop a stand alone application for a medical store with Java Swing. There is a mandatory requirement of printing of a sheet with a small size (219mm to 140mm) with a single click without the ...
3
votes
2
answers
2k
views
Use geometric shapes as components
I am trying to create an application similar to Paint, in which I must use some basic shapes in order to create more complex ones.
I will use Swing. I have to be able to drag and drop objects from ...
0
votes
2
answers
53
views
Is it possible to make different mouseClicked() for the same class?
My java program already have a Canvas, I plan to add 4 Components with MouseListener to that Canvas to act as 4 Buttons. Of course 4 "buttons" will respond differently
Can i create only ONE class for ...
2
votes
1
answer
12k
views
Destroy instance of class then create instance of it again
i have a class (Class ButtonX) that contains a button
when user clicks the button, it will create instance of the class DialogX
when I create instance of the class DialogX it will show up JDialog
...
2
votes
1
answer
3k
views
java multiple graphics [closed]
Okay so I have been working on this code for awhile that shows how the sorting algorithms work. Right now I have it working where it sorts multiple graphs with the same sort but I need each graph to ...
1
vote
1
answer
42
views
What problems might arise when adding JComponents to a component
I am making some changes to an existing application whoose screens have been implemented by using awt components. Using swing in the new elements will make life easier but i know that there are some ...
1
vote
1
answer
255
views
mouse listener only one instance works
So i am setting mouse listeners to java components in the following manner:
int[] monsters = new int[12];
monsters[0] = MonsterSelector.BL_BLUE_BUFF;
monsters[1] = MonsterSelector....
1
vote
2
answers
762
views
How to create a custom GUI component in Java? (Need starting hints)
I would like to create a custom component in Java.
It is like a text area but it is composed by grid and, as you write, every character goes in a grid cell.
I have no idea where to start from.
I ...
8
votes
2
answers
9k
views
MediaTracker - how to use it, what are the benefits, or is there an alterative?
In the codebase we inherited the usage of MediaTracker was always done locally in each code block.
new MediaTracker(new Canvas());
mediatracker.addImage(i, 1);
try {
mediatracker.waitForAll();
} ...