How to add a GUI interface to My program?
Hi, I wrote a game program, now, I need a GUI interface for my game to let others to use it esaily, but I have no idear how to do it, where should I add the AWT or Swing code to the game code, if possible, can I use some tools for this task, I think it is much esaier for me to use tool, can I use JBuilder4.0, or visual J++6.0, but I know that visual J++ not support jdk1.3, right? Any other good tool for AWT to use, if possible, where to download please?
thank you!! ^_^
Generally your GUI code might be in a class extending JFrame, for example. It is good practice to try to keep your GUI separate from the rest of your application. So you can control your application from the GUI by public methods in the main part of the code, calling them from the GUI.
This is best done by passing an instance of the main application to the GUI when it is constructed. For example:
public class Host {
public static void main(String[] args) {
new Host();
public Host() {
GUI iface = new GUI(this);
public doSomething(int value) {
// A method that does something,
// called from the GUI
public class GUI extends JFrame implements actionListener {
private Host app;
public GUI(Host parent) {
app=parent;
// Do more stuff here
// Rest of the GUI here
public void actionPerformed(ActionEvent ev) {
// Method called as a result of a button press
// or something...
app.doSomething(42);
}Hope this helps a bit. Look around on the web for good GUI tutorials.
Similar Messages
-
How to Add a Physical Interface After Installation in Solaris 10
How to Add a Physical Interface After Installation in Solaris 10
Hi Java Specialist,
I am trying to setup a network interface with the following steps on a new fresh Solaris 10 installation using the instruction titled How to Add a Physical Interface After Installation in Solaris 10 3/05 ONLY from http://docs.oracle.com/cd/E19253-01/816-4554/esxhb/index.html:
1. # ifconfig lo0 plumb up
2. # ifconfig lo0 10.56.8.101 netmask 255.255.240.0. This was the working Windows DHCP environment prior to installing Solaris
10 on top of it.
3. # Added saturn to /etc/hostname.lo0.
4. # Added 10.56.8.101 to /etc/inet/hosts
5. # Added 10.56.0.0 255.255.240.0 to /etc/inet/netmasks
6.# reboot
However, the following errors kept recurring:
svcs –xv …. unable to qualify my own domain name,
failed with exit status 69.
Any idea on what other steps have I missed? I was hoping to only do step 3 – 6 for the change to apply permanently.
Many thanks,
JackHi Java Specialist,... in a Solaris forum?
1. # ifconfig lo0 plumb upThe loopback connection (your lo0)is NOT a physical interface. There are no hardware components for it. Nor can I think of any reason why it should ever be anything other than the default 127.0.0.1
Use your favorite Internet search site (such as Google, Bing, Yahoo) to learn more about it.
2. # ifconfig lo0 10.56.8.101 netmask 255.255.240.0. This was the working Windows DHCP environment ...I have no idea how a nonexistent software construct gets a DHCP address in a MS Operating System, unless you are confusing this with the "Microsoft Loopback Adapter" which is an utterly different concept. Again, go see what Google tells you.
<br>
<br>
<br>
... completely unrelated to configuring an IP...
unable to qualify my own domain nameAgain, search the Internet or even search these forums with that string of words.
Go back through your two most recent posts and read the responses again.
They seem to both be on the same topic as this new one -- configuring an IP on something.
How to initialize new IP address on secondary interface permanently
How to change IP address permanently on Solaris 10
When you've done all that, then come back and tell us what you are actually trying to do. -
How to add a gui status in selection screen
hi
experts can u help me plzzzzzzzzzzzzzzzzzzzzzz
for thisHi Ravi,
Refer
how to add a gui status in a selection screen?
gui status in selection screen
gui status in selection screen
how to set my own gui status when i use selection-screen
Reward if it helps
Regards,
Santosh -
How to create custom GUI interface for Cisco router?
Hello,
I am working on a Cisco solution and I have my router configured for the solution I need. However, if a non-cisco person needs to use my solution then I think he will need a GUI interface which will have few "buttons" which when clicked will run some Cisco commands on Cisco router to make it work. Is there a way to design such GUI interface which is compatible with Cisco routers? I know Cisco has SDM, but that is too involved and detailed, which is useful only for people who know atleast a little bit about Cisco. Here I am looking at crowd who will have 0 knowledge of Cisco.
Please let me know if something like this can be done. If yes, how and how easily?
Thank you.There are lots of ways to do this - you can use SNMP or even HTTP to push or pull commands from Cisco devices. How easy it is to create a GUI depends on your programming skills. I would guess a simple web page triggering backend scripts would be the easiest way to do this.
-
How to add vlan virtual interface on a Catalyst Using SNMP
Hi,
I need some assistance in locating the mib/variables to allow me to add and remove vlan
virtual interface on Catalyst 3759G. If I understand correctly CISCO-VTP-MIB can not carry
out this requirement.
Is there another way of accomplishing this using SNMP ?
Thanks,
ZhouYou cannot add a new interface directly using SNMP. However, you can use the CISCO-CONFIG-COPY-MIB to copy a config snippet into the running configuration which can create a new VLAN interface. See http://www.cisco.com/en/US/tech/tk648/tk362/technologies_configuration_example09186a0080094aa6.shtml for more details.
-
How to add fields in z of standard program me5j
Hi Experts,
i have to add new field in zprogram of standard alv in ME5J.
its out put structure is MEREP_OUTTAB_EBANACC
but not getting the method that how to add new feild in that structure, as my values are comming in stab_aban internal table.
please help me to get out of this as soon as possible.
waiting for the reply
Thanks and Regards
Neha
Edited by: neha1.gpta on Jun 8, 2010 1:14 PMHi
Use the function module REUSE_ALV_FIELDCATALOG_MERGE
Then use the structure MEREP_OUTTAB_EBANACC to create the field catalogue
Now call the REUSE_ALV_GRID_DISPLAY with your internal table it would work.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
I_INTERNAL_TABNAME =
i_structure_name = 'MEREP_OUTTAB_EBANACC '
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3
LOOP AT it_fieldcat INTO wa_fieldcat
WHERE fieldname = 'CONTRACT' OR
fieldname = 'ZUPDCIND' .
IF wa_fieldcat-fieldname = 'CONTRACT'.
wa_fieldcat-hotspot = c_x.
MODIFY it_fieldcat FROM wa_fieldcat.
ELSEIF wa_fieldcat-fieldname = 'ZUPDCIND'.
DELETE it_fieldcat INDEX sy-tabix.
MODIFY it_fieldcat FROM wa_fieldcat.
ENDIF.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = gs_layout
it_fieldcat = it_fieldcat
TABLES
t_outtab = it_output1
Edited by: mukesh mahajan on Jun 8, 2010 1:38 PM -
How to separate the GUI interface from program execution in Labwindows?
Hallo,
I am trying to combine TCL interpreter with Labwindows in order to executes tcl scripts with user implemented C functions that interact with devices in Labwindows. The idea is from another hand to have the ability to control my program from GUI and in the same time to be able to execute command scripts that will take a more control on the device interface.
I can invoke the tcl interpreter for a single command or not so complicated script. When I execute a simple loop from the script my user interface stop to respond to any messages until interpreter exits the loop.
The question is how to separate both the GUI and the program that executes in background in my case the tcl interpreter?
Thanks,
NikolaiProbably the best solution would be to do the TCP loop in another thread. For help with multithreading programming, see the CVI Multithreading Overview (cvi\bin\MultithreadingOverview.pdf) and the multithreading example programs (cvi\samples\utility\Threading).
Best Regards,
Chris Matthews
National Instruments -
How to add VB porgram in the Concurrent Program Source type
Hi Everybody,
We have lot of Scheduled programs in VB. For example fetching data from prod and insert those into data warehouse related table. Similarly we have lot of VB programs
This is already written in VB and working fine. These are all in the Standalone system. Now the Management wants them to be as a part of the application, so that they can get rid of the stand alone processing.
They asked me to create a concurrent program and schedule it for each and every scheduled VB programs. We are using oracle apps 11.5.10 and db 9i. I have a little experience in concurrent programme executable and defn for the reports, SQL, PL/SQL and host. I don't have any idea for the VB programs. What type of execution method I can use for my problem.
Please give me any idea/suggestions.
Thanks,
VimalI do not think you can register a VB program as concurrent program -- Re: How can we register a VB Script into Oracle Application as concurrent P
You may log a SR and confirm this with Oracle Support.
Thanks,
Hussein -
How to add the search help in Screen programming "F4" help
i add the input field
se51 --> layout and now want to add the search help with these field,
please help me... in this way.Looks like u r a novice in Mp programming.
Please look at some demo programs in SAP which can teach u the basics of Module Pool programming . Use Demo* in se38 and search first in sap and then in some other sites.
The above thing can be done in Process on value request .
Br, vijay. -
How to add new fuctionality without modifying Print Program.
Hi,
This is Venkatrami Reddy.
I have a requirement which needs to display Vendor Number in form.
So, Please help me on this issue with some example code by using ITCSY Structure.
Thanks
Venkatrami ReddyHi
Welcome to SDN forum
check the Existing Script program whether the field Vendor Number (LIFNR) is available or not, (for example if you are using PO script MEDRUCK then it will be there in EKKO table structure)
then only you need to write an external subroutine using ITCSY structure and to bring the data from external table and to write in the script
see the sample code
REPORT ZMPO1 .
form get_freight tables in_par structure itcsy out_par structure itcsy.
tables: ekko,konv,t685t.
data: begin of itab occurs 0,
ebeln like ekko-ebeln,
knumv like ekko-knumv,
end of itab.
data: begin of itab1 occurs 0,
knumv like konv-knumv,
kposn like konv-kposn,
kschl like konv-kschl,
kbetr like konv-kbetr,
waers like konv-waers,
kwert like konv-kwert,
end of itab1.
data: begin of iout occurs 0,
kschl like konv-kschl,
vtext like t685t-vtext,
kbetr like konv-kbetr,
kwert like konv-kwert,
end of iout.
data v_po like ekko-ebeln.
read table in_par with key 'EKKO-EBELN'.
if sy-subrc = 0.
v_po = in_par-value.
select
ebeln
knumv
from ekko
into table itab
where ebeln = v_po.
if sy-subrc = 0.
loop at itab.
select
knumv
kposn
kschl
kbetr
waers
kwert
into table itab1
from konv
where knumv = itab-knumv and
kappl = 'M'.
endloop.
loop at itab1.
if itab1-kposn <> 0.
select single * from t685t
where kschl = itab1-kschl
and kappl = 'M'
and spras = 'EN'.
iout-vtext = t685t-vtext.
iout-kschl = itab1-kschl.
iout-kbetr = itab1-kbetr.
iout-kwert = itab1-kwert.
append iout.
clear iout.
endif.
endloop.
sort itab1 by kposn.
loop at iout.
sort iout by kschl.
if ( iout-kschl eq 'GSDC' OR
iout-kschl eq 'GSFR' OR
iout-kschl eq 'GSIR' ).
at end of kschl.
read table iout index sy-tabix.
sum.
write:/ iout-kschl,iout-vtext,iout-kwert.
out_par-name = 'A1'.
out_par-value = iout-vtext.
append out_par.
out_par-name = 'A2'.
out_par-value = iout-kwert.
append out_par.
endat.
endif.
endloop.
endif.
endif.
endform.
IN THE FORM I AM WRITING THIS CODE.
/:DEFINE &A1& = ' '
/:DEFINE &A2& = ' '
/:PERFORM GET_FREIGHT IN PROGRAM ZMFORM_PO1
/:USING &EKKO-EBELN&
/:CHANGING &A1&
/:CHANGING &A2&
/:ENDPERFORM
&A1&
&A2&
This Code is to be written in the PO form under ADDRESS window.
/:DEFINE &A1& = ' '
/:DEFINE &A2& = ' '
/:DEFINE &A3& = ' '
/:DEFINE &A4& = ' '
/:DEFINE &A5& = ' '
/:DEFINE &A6& = ' '
/:PERFORM GET_VENDOR IN PROGRAM ZMFORM_PO
/:USING &EKKO-EBELN&
/:CHANGING &A1&
/:CHANGING &A2&
/:CHANGING &A3&
/:CHANGING &A4&
/:CHANGING &A5&
/:CHANGING &A6&
/:ENDPERFORM
&A1&
&A2&
&A3&
&A4&
&A5&
&A6&
<b>Reward points for useful Answers</b>
Regards
Anji -
How to add adobe toolbar to office 2013 programs?
Some users where I work complained of having lost Adobe toolbar and right-click options after upgrading from Office 2010 to version 2013. I don't seem to find a way to adding these options back . . .
What Adobe toolbar are you referring to?
-
Any gui interface for java db (derby ) such as oracle give sqldeveloper
hi master
sir any gui interface for java db (derby ) such as oracle give sqldeveloper that create table and view only mouse clicking
how i get derby gui interface
thank'
aamirtry db visualizer
http://www.minq.se/products/dbvis/ -
How to add a new network interface adapter?
Hello,
I followed this tutorial (http://www.oracle.com/technology/obe/ovm/ovmel5pvmdb11gr1/ovmel5pvmdb11gr1.htm) to set up a paravirtualized Oracle Enterprise Linux Version 5 VM on Oracle VM Server. It works fine, however I wish to add another network interface adapter (or NIC) to it, however when I try to import into Oracle VM Manager I get the following error:
"OVM-5004 Invalid virtual machine config file. -"
I don't know where the vm config file is so I can't fix that (I did a search for vm.cfg but couldn't find it). I figured since I could access the machine OK I wouldn't worry about importing it into VM Manager, so my question is, is there a way to set up the Network Interface Adapter through the command line on the VM Server (similar to how it was setup)? Or should I try and fix the "invalid virtual machine config file" error so I can import it into VM Manager and then add the extra Network Interface Adapter?
Thanks in advance,
Michael.user10862036 wrote:
I don't know where the vm config file is so I can't fix that (I did a search for vm.cfg but couldn't find it). The vm.cfg file would be found in /OVS/running_pool/<vm_name>/ -- the default vm.cfg that ships with the template should successfully import into Oracle VM Manager. Once you have the image imported, you can use Oracle VM Manager to add an additional NIC to the VM. -
How to add Two Interface Mappings to One Receiver(BPM) Help needed urgently
I have a requirement where i get a flat file and split into multiple files and send to BPM.
For each split file I created Interface Mapping using Java Mapping Program.
In the Configuration how to add more Interface Mappings?
Thanks for your help in advance.
Regards
SudhaYou can use Enhanced Interface Determination to split one message to Multiple hence to multiple Interfaces.
You have to change the Occurance of Messages in Message Mapping and their Corresponding Interfaces in Interface Mapping. That would create Multiple Files with Multiple Interfaces to Receiver (BPM)
1) You need not to use Multilpe Interface Mapping
2) You will use Extended Interface Determination for this.
regards.
Jeet. -
How to add interface to customlize MXML Component when use Flex Builder 3?
How to add interface to customlize MXML Component when use
Flex Builder 3?David,
I don't believe you can add the interface via the creation
dialog in FlexBuilder 3. You can always manually add the
"implements" property to your MXML Component root tag. Something
like this: <mx:VBox implements="com.mycorp.IMyInterface">
If you want autogeneration of the interface, then create an
ActionScript class with that interface and then copy the generated
functions and setter/getters into the script block of your MXML
component.
Maybe you are looking for
-
Since the last update it seems that my whole mac is extremely slow, but no where is this more evident than when running Safari. To qualify this I'll tell you that per activity monitor only half the memory is being used and the CPU usage is fairly slo
-
Device Driver Software Not Installed Properly
Hi I have Reinstalled Windows 7 ultimate 64 bit, after installing all hp drivers I lost WIFI and when checked Device Manager I found Under >Display Drivers >(1)standard VGA Graphics Adapter (ERROR)- when I right click mouse and check under general th
-
In the last few days iTunes on my iMac intel 21.5" has been launching unexpectedly and repeatedly. I have OSX 10.7.2 and iTunes 10.5.3 installed and usually only Mail and Safari running, although it makes no difference what else is actually running.
-
Web Service Deployment error on WLS6.1
Hi All, I'm trying to deploy a dummy SOAP service on WLS6.1, build on a plain Java class. All the procedure works well on tomcat 3.2, and my SOAP client invokes all the methods and gets expected response successfully. When I even try to deploy it on
-
How can i set/alter control properties programmaticaly in manage bean?
Hi, i want to enable a selectonechoice on click of a button in adf.how can i do this using code in managebean. my jdev version is 11.1.1.5.0