View Full Version : Java Gui Code Really Annoys Me
4th gen
03-22-2004, 11:14 PM
:angry: :angry: :angry: :angry: :angry:
Stupid bloody java GUI code :angry:
bigboab
03-22-2004, 11:15 PM
Originally posted by 4th gen@22 March 2004 - 23:14
:angry: :angry: :angry: :angry: :angry:
Stupid bloody java GUI code :angry:
Is that GUI or GVI?
4th gen
03-22-2004, 11:19 PM
Originally posted by bigboab@22 March 2004 - 22:15
Is that GUI or GVI?
GUI (Graphical User Interface)...
What is GVI?
benxuk
03-22-2004, 11:21 PM
why does it annoy you,
bigboab
03-22-2004, 11:23 PM
Originally posted by 4th gen+22 March 2004 - 23:19--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (4th gen @ 22 March 2004 - 23:19)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-bigboab@22 March 2004 - 22:15
Is that GUI or GVI?
GUI (Graphical User Interface)...
What is GVI? [/b][/quote]
I would have thought in this day and age it would be all drag and drop. No need for code.
4th gen
03-22-2004, 11:23 PM
Originally posted by benxuk@22 March 2004 - 22:21
why does it annoy you,
It's over-complicated. Have you ever used it?
bigboab
03-22-2004, 11:24 PM
GVI is just my bad eyesight. :lol:
benxuk
03-22-2004, 11:25 PM
thats kinda open questioned really? am i right in thinkin your using java and the project has a gui?
what you using?
4th gen
03-22-2004, 11:27 PM
This is the code you need to make a row of a few buttons. The buttons don't do anything (the only thing is that when you click on "quit", the title changes to "you clicked quit"). You can't even close the window with this code:
import java.awt.*;
import java.awt.event.*;
public class BankGUI extends Frame implements ActionListener{
protected Button quitButton, openAccountButton, depositButton;
protected Button getTotalAssetsButton, withdrawButton, getBalanceButton;
protected TextField OAAccNo, DAccNo, DAmount, WAccNo, WAmount;
protected TextField WSuccess, ABAccNo, ABAB, TBATA;
protected Panel bankPanel;
public BankGUI(){
setSize(800,600);
setResizable(true);
setTitle("My Bank");
setLocation(150,250);
quitButton = new Button("Quit");
quitButton.addActionListener(this);
openAccountButton = new Button("Open a new account");
openAccountButton.addActionListener(this);
depositButton = new Button("Deposit an amount");
depositButton.addActionListener(this);
withdrawButton = new Button("Withdraw an amount");
withdrawButton.addActionListener(this);
getBalanceButton = new Button("Check account balance");
getBalanceButton.addActionListener(this);
getTotalAssetsButton = new Button("Total balance in bank");
getTotalAssetsButton.addActionListener(this);
bankPanel = new Panel();
bankPanel.add(quitButton);
bankPanel.add(openAccountButton);
bankPanel.add(depositButton);
bankPanel.add(withdrawButton);
bankPanel.add(getBalanceButton);
bankPanel.add(getTotalAssetsButton);
this.add("South",bankPanel);
this.pack();
}
public void actionPerformed(ActionEvent event){
if (event.getSource() == quitButton){
setTitle("You clicked quit");
}
}
public static void main(String args[]){
BankGUI bank = new BankGUI();
bank.show();
}
}
bigboab
03-22-2004, 11:30 PM
It is not unlike 'C'.
4th gen
03-22-2004, 11:30 PM
Originally posted by benxuk@22 March 2004 - 22:25
thats kinda open questioned really? am i right in thinkin your using java and the project has a gui?
what you using?
JCreator as my compiler
It's a practical for my programming lab tomorrow. Basically, we have to make a GUI which drives the practical we did last week.
(I'm not looking for help, btw, just wanting to let off steam :))
4th gen
03-22-2004, 11:31 PM
Originally posted by bigboab@22 March 2004 - 22:30
It is not unlike 'C'.
Personally, I've never used C. Up until about 7 months ago, I'd never used a programming language before.
benxuk
03-22-2004, 11:33 PM
well obviously that event needs the right code to be executed, being a java n00b i dunno the exact syntax, pascal would have been formx.close; i expect the syntax in java should be quiet similair, but the question remains... what software you using?
if ya not using anything for design, try Sun One Studio 5 i got it yesterday, tis ok! theres a personal edition at the sun website (http://www.sun.com) :01:
adlib: :lol: just read your last'th post
adlib 2: fuck off bb code
adlib 3:
setTitle("You clicked quit"); :huh: change this bit!!!!
bigboab
03-22-2004, 11:36 PM
We had to start with Assembly language then the following in order. Basic, Pascal, Cobol, C, C++, Visual Basic plus all the database incorporated languages. :(
benxuk
03-22-2004, 11:37 PM
Originally posted by bigboab@22 March 2004 - 23:36
We had to start with Assembly language then the following in order. Basic, Pascal, Cobol, C, C++, Visual Basic plus all the database incorporated languages. :(
lololol they put you on VB after C? double-you-tea-eff
bigboab
03-22-2004, 11:39 PM
There was no VB in those early days
benxuk
03-22-2004, 11:42 PM
so why'd they bother? <_<
4th gen
03-22-2004, 11:42 PM
Originally posted by benxuk@22 March 2004 - 22:33
well obviously that event needs the right code to be executed, being a java n00b i dunno the exact syntax, pascal would have been formx.close; i expect the syntax in java should be quiet similair, but the question remains... what software you using?
if ya not using anything for design, try Sun One Studio 5 i got it yesterday, tis ok! theres a personal edition at the sun website (http://www.sun.com) :01:
adlib: :lol: just read your last'th post
adlib 2: fuck off bb code
adlib 3:
setTitle("You clicked quit"); :huh: change this bit!!!!
Sorry, I can't make much sense of this post :(
@BB, I never knew you were so experienced in the ol' programming...how hard was coding in assembly language?
benxuk
03-22-2004, 11:44 PM
did you see the bit i q'd you do know that needs changing right?
bigboab
03-22-2004, 11:45 PM
It is difficult because you have to know everything that your code actually does. There was nothing to tell you what you were doing wrong. It just did not work. :lol:
Cant remember any of it now though. Have a few pascal programs i wrote before the mouse came into use.
4th gen
03-22-2004, 11:47 PM
Originally posted by benxuk@22 March 2004 - 22:44
did you see the bit i q'd you do know that needs changing right?
Why does it need changed? :unsure:
benxuk
03-22-2004, 11:48 PM
do you need the form to close? :unsure:
4play
03-22-2004, 11:49 PM
java aint too bad. try doing a gui in c using the windows api and then you can complain.
@bigboab assembly to do gui stuff :helpsmile:
4th gen
03-22-2004, 11:50 PM
Originally posted by benxuk@22 March 2004 - 22:48
do you need the form to close? :unsure:
Oh, right. Nah, it doesn't need to close at the moment. I thought you were saying there was something wrong with the syntax...
4th gen
03-22-2004, 11:51 PM
Originally posted by 4play@22 March 2004 - 22:49
java aint too bad. try doing a gui in c using the windows api and then you can complain.
Got to remember I'm a noob though ;)
benxuk
03-22-2004, 11:52 PM
Originally posted by 4th gen+22 March 2004 - 23:50--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (4th gen @ 22 March 2004 - 23:50)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-benxuk@22 March 2004 - 22:48
do you need the form to close? :unsure:
Oh, right. Nah, it doesn't need to close at the moment. I thought you were saying there was something wrong with the syntax... [/b][/quote]
:lol: see /me is n00b and i assumed with the paste you were having trouble :rolleyes: just hit me, i'll start working right again
4th gen
03-22-2004, 11:58 PM
Originally posted by benxuk@22 March 2004 - 22:52
:lol: see /me is n00b and i assumed with the paste you were having trouble :rolleyes: just hit me, i'll start working right again
:lol:
My fault for not being specific. It's just that I've been working on it for a while (I started off doing absolute referencing for the buttons, I stupidly thought it might be easier (what a stupid, stupid idea that was))
Java is a fucking bloated language.
benxuk
03-23-2004, 12:00 AM
:rolleyes: you and your stupid eh :rolleyes:
so hows JCreator to work with then? from an frightfully n00b distance :helpsmile:
4th gen
03-23-2004, 12:07 AM
Originally posted by haxor41789@22 March 2004 - 23:00
Java is a fucking bloated language.
Yep, it's a shame that they're still teaching us it though...by the time we graduate it'll be totally obselete probably...
JCreator is a good program, it's free from the main site here (http://jcreator.com/download.htm) :)
benxuk
03-23-2004, 12:12 AM
cool, i'll enjoy this free product :D
a little off topic, anybody know how distant actionscript is from java?
ActionScript is Flash, and :o OT? This is the lounge!
Powered by vBulletin® Version 4.2.3 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.