How to start with a gui
Hi,
i have a program that works fine, at the moment it just outputs results to the screen.
I'm required to create a gui for this but really don't know where to start.
i have a Test class which has a main method in it which calls all the other classes.
my main class is below:
public class Test
public static void main(String[] args)
Data d = new Data();
Vector data = d.readFile("File9.txt");
/*normalise the data and store in vector (outerVetor)*/
Normalise rf = new Normalise();
Vector dataNormalised = rf.normalise(data);
datasize = dataNormalised.size();
Affinity af = new Affinity();
Vector affinity = af.calcAffinity(dataNormalised);
Initialise i = new Initialise();
i.setSeed(1);
seed = i.getSeed();
i.setHypermutationRate(2.0);
hypermutationRate = i.getHypermutationRate();
i.setClonalRate(10.0);
clonalRate = i.getClonalRate();
i.setTotalResources(15.0);
totalResources = i.getTotalResources();
i.setStimulationValue(0.99);
stimulationValue = i.getStimulationValue();
i.setAffinityThresholdScalar(0.2);
affinityThresholdScalar = i.getAffinityThresholdScalar();
i.setKNN(4.0);
KNN = i.getKNN();
Vector MemoryPool = i.seedMemoryPool(dataNormalised, seed);
Float affinityThreshold = i.affinityThreshold(affinity);
Stimulation s = new Stimulation();
Training t = new Training();
CompetitionForLtdRes c = new CompetitionForLtdRes();
MemoryCellSelection MS = new MemoryCellSelection();
Classification C = new Classification();
for(int k=0;k<dataNormalised.size();k++)
Antigen = (Vector)dataNormalised.elementAt(k);
if(memPoolStimulation.floatValue() == zero.floatValue())
MemoryPool.add(Antigen);
else
stimIndex = s.getStimIndex();
Vector ARB =t.ARBGeneration(BestMatch,hypermutationRate,clonalRate);
Vector Candidate = c.runARBRefinement(ARB, Antigen, maxDist,stimulationValue,clonalRate, totalResources);
MemPoolsize = MemoryPool.size();
reduction = 100 - ((double)MemPoolsize/datasize*100);
Antigen1 = (Vector)dataNormalised.elementAt(1);
Float classify = C.KNN(MemoryPool,Antigen1, KNN, maxDist);
}I really don't know where to start with this. i know i need a fileDialog to select whic file to use at the start and a scrollable pane to display trhe results but really don't know where to begin.
can anybody offer some help or point me in the right dircection?
Cheers
Hi,
I've managed to open a file using the file dialog.
I'm trying to noe perform an action with this file. I have a class called Data which reads in a file and reads each line of the file into a vector. so i have a vector of vectors at the end where the inner vectors are the lines of the file.
I'm unsure of how to call this class using the selected file.
ultimately this is the kind of thing i'm going to need to do through out.
i have created an instance of the class Data and trie to call the method using the file but getting the following error:
RunPanel.java:59: readFile(java.lang.String) in Data cannot be applied to (java.io.File)
Vector data = d.readFile(file);
my code is:
public class RunPanel extends JPanel implements ActionListener
JButton openButton;
JTextArea log;
JFileChooser fc;
//cretaed an instance of Data class to use later on
Data d = new Data();
public void actionPerformed(ActionEvent e) {
//Handle open button action.
if (e.getSource() == openButton) {
int returnVal = fc.showOpenDialog(RunPanel.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
//This is where a real application would open the file.
log.append("Opening: " + file.getName() + "." + newline);
//trying to call the readfile method in Data class here
Vector data = d.readFile(file);
} else {
log.append("Open command cancelled by user." + newline);
log.setCaretPosition(log.getDocument().getLength());
}can anybody explain what's going on here?
Cheers
Similar Messages
-
How to start with JDeveloper?
As a straight A student of Computer Science, I put my hands on database development of an information system project for our CS faculty this summer. JDeveloper is used as the IDE for such project.
I have learnt Java 2 and something about Oracle database in my courses. Now, after reading the product introduction and a short online course outline in iDeveloper2001, I have a brief idea about it. But since I can not afford much, how to learn more about it? Could you offer me some advices?
Thanks a lot!The online users guide and documentation is the best place to
start to learn how to use JDeveloper.
- PSW
Ram Purushothaman (guest) wrote:
: Hi,
: I am new to this Jdeveloper. I need to develop a intranet
: project. Basically, I have to get the employee details from the
: HR like work-telephone, email-address, etc.
: Can somebody let me know how to start with Jdeveloper.
Basically
: I need to have a query screen (query by last_name or first_name
: etc) and a result screen (results based on the query).
: Any help is appreciated.
: Thanks.
: Ram.
null -
Hi,
Can anyone please provide me the documents on how to start and learn with Oracle apps AOL(technical).
Please provide me the required documents to learn.
Thanks in advance.Duplicate thread.
How to start with AOL
How to start with AOL -
Myself is an Electronics Engineer. But I don't have any exposure to any comp language like C or whatever. I do not have any exposure to Labview as well. I've been involved in design and developing Digital Circuits like interlock units, Position monitoring and display systems etc. Now I want to work upon FPGA based circuits. Can anyone suggest me plz that how to start with?
Hi BNarendra;
Here are some resources that can be useful, the first is an introduction to LabVIEW and the other ones are for LabVIEW FPGA.
LabVIEW
http://zone.ni.com/devzone/cda/tut/p/id/5247
LabVIEW FPGA
http://www.ni.com/swf/presentation/us/labview/lvfpga/default.htm
http://digital.ni.com/public.nsf/allkb/0697A6F4BFC6E152862570FA0072153A?OpenDocument
http://zone.ni.com/devzone/cda/tut/p/id/3261
I hope the information is useful.
Good Luck!
Francisco Arellano
National Instruments Mexico
Field Systems Engineer - Energy Segment
www.ni.com/soporte -
hi all,
I am a java developer, i came across FB and FDS through my
Friend, and soon, got addicted for the latest RIA development
tools.
I downloaded the Latest Trial of both FB and FDS and try to
start things...but, i got stuck up at the initial configuration
stage itself.
can anyone point me to how to start with FDS and Java, any
site URL or sample code....so that i will start working with
FDS.
cheers
saikiranHello There,
There is plenty of stuff to start with for Adobe Flex. I will
say start searching for tutorials available online & checkout
flex developers blogs.
www.adobe.com/devnet/flex/ is the best resource available,
there are sample applications available along with the code,
different blogs are also listed there.
If you are java developer & have knowledge of Hibernate,
I would suggest start with:
http://blogs.adobe.com/mtg/2006/08/my_first_hibernate_enabled_fle.html
Best of Luck! -
Hi, friends:
I have read much online material about CDC, but I'm still confused.
I knew that I can download the WTK2.2 or higher to develop the app based on the CLDC and MIDP.
My question is how to start with CDC. For example, If I use JBuilder, what stuff should been downloaded and installed? and how about the Eclipse?
And some online learning resource is better!
Thanks in advance!See
http://home.elka.pw.edu.pl/~pboetzel/
for HOWTO run SWT application on PocketPC (emulator). I used CDC 1.1 Personal Profile 1.1. You will find exact instructions what to download and install to write and run CDC applications. And also links to other guides and tutorials. -
Hi
I am Vijay and i'm new to BSP.
I want to know how to start with BSP and what kind of questions i can expext in interviews on BSP ...!Welcome to SDN.
best place ot start learning BSPs is
http://help.sap.com/saphelp_nw04/helpdata/en/e9/bb153aab4a0c0ee10000000a114084/frameset.htm
Regards
Raja -
How to start with Java TV API?
Hi,
I am new to Java TV API and i don't know how to start with it. Can any body suggest me what i would require(Software and hardware) to start coding in Java TV. Is MHP API are required for it if yes then how i can get those APIs??
Thanks in advance
Sajal Mahajan
[email protected]
Message was edited by:
Sajal.MahajanOCAP 1.0 and 1.1 specifications are avaible here:
http://opencable.com/specifications/ocap.html
tutorials:
http://interactivetvweb.org
Emulator:
http://xletview.sourceforge.net/ -
How to start with OA Framewok.
Hi All,
Can you please let me know how to start with OAF and which software needs to install to start with.
Also, please send me the document if you have for OAF.
Thanks in Advance,
Amolrefer this http://prasanna-adf.blogspot.com/2008/11/new-to-oaf.html
--Prasanna -
i'm new to bussiness server pages, how to start with it.
how to create a bsp application and work with it.hi phani,
to start creating a bsp application,
first go to se80 tcode, there select 'bsp application' category and create a new application.
now you can start creating your first bsp application.
use the following link for it :
http://help.sap.com/saphelp_nw2004s/helpdata/en/c8/101c3a1cf1c54be10000000a114084/content.htm
plz reward if useful. -
How to start with RMAN as I am beginner?
Dear all,
How to start with RMAN as I am beginner? Any simple document or guide line for me.
Thanks,
AmyHow to start with RMAN as I am beginner? Any simple
document or guide line for me.go to yours oracle home directory /orahome/bin there is RMAN exe tool run it it will show you prompt RMAN
Recovery Manager: Release 10.1.0.2.0 - Production
Copyright (c) 1995, 2004, Oracle. All rights reserved.
RMAN> connect target sys/sys
connected to target database: ORCL (DBID=1171886541)
RMAN> backup database
2> ;
Starting backup at 21-JAN-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSTEM01.DBF
input datafile fno=00003 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSAUX01.DBF
input datafile fno=00005 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\EXAMPLE01.DBF
input datafile fno=00002 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\UNDOTBS01.DBF
input datafile fno=00004 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\USERS01.DBF
channel ORA_DISK_1: starting piece 1 at 21-JAN-08
channel ORA_DISK_1: finished piece 1 at 21-JAN-08
piece handle=C:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2008_01_21\O1_MF_NNNDF_TAG20080121T135924_3S8QQF74_.BKP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current controlfile in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-JAN-08
channel ORA_DISK_1: finished piece 1 at 21-JAN-08
piece handle=C:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2008_01_21\O1_MF_NCSNF_TAG20080121T135924_3S8QSSN4_.BKP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 21-JAN-08
http://www.orafaq.com/faq/rmanKhurram -
How to start with framemaker 11 for online documentation
How to start with Adobe Framemaker 11 for online documentation?
Hi,
Try googeling and search for adobe actionscript code and tutorial e.g.:
http://fmsguru.com/tutorials.cfm
http://www.flashcomguru.com/tutorials/
http://www.adobe.com/devnet/flashmediaserver/
Good luck,
Alon -
How to start with a "clean slate"
Appologies for such a simple question, but I want to start off on the right foot here. I've just got Tom Wolksy's FCE2 book and want to get started, but relized that my version of FCE opens a previous project that my wife had started some time ago when we first got the software. Windows and clips are all over the place. I thought using the New Project comand would get this stuff out of the way, but it does not seem quite that easy.
Is there any quick way to make all of this old stuff go away and start with a fresh view of the program as if I was opening it for the first time. Unfortunately, Tom's book (like most really) starts from the ground floor and my work space in FCE is anything but this at the moment, and there is no real direction as to how to get to this point. Thanks for any advice,1) Designate a Scratch Folder for your new project; create a folder on the hard drive to which you will save your media
2) Open FCE. The old project loads up. From the File tab, select Close Project. You will get an option to Save . .up to you
3) Create a New Project and name the Sequence.
4) From the FCE tab, select System Settings and point that to your new Scratch Folder
5) Save As ... give your project a new name in a folder that you have created somewhere. I save my projects on the system drive where FCE is, not on the scratch disk where the media is stored -
How to start with Discoverer - Oracle Apps - New Org Setup
Hi,
Our discovered expert retired and unfortunately no docs are available.It is in use for existing Operating units(11.5.10) Now i wanted to setup discoverer reports for newly setup OU;s.
How do i start with ?Any help is appreciated.
Rgds-PVWelcome
http://www.oracle.com/technology/documentation/applications.html
You can download from here.
Regards
Asif Kabir
-- If helpful mark the post as correct/helpful, also close the thread as answered. -
HAllo everybody,
i try to develop an application with java, in which i need to send e-mails to users.
but i don't know how i should start with it.
i have some problems
1)should i install a mailserver to use smtp? if yes is there any free mailservers??
2) how van i realize to send mails? is there any usefull link or documantation??
thanksRead the "Javamail FAQ" (Google it if you can't find the like on the site, it's the first hit).
All your questions are answered there.
travis (at) overwrittenstack.com
Maybe you are looking for
-
Help needed in making table name and column name dynamic
please check the below query? in the below message Message was edited by: 460425 Message was edited by: 460425
-
Appointment Calendar on Forms 6i
Hello Forms Experts: I have an Health Care application with all the powerful functions availables. But, I need to update the release of the software and for that I want, to create a forms module to works as a appointment calendar. Let me explain a li
-
I'm going to China in less than a week. I would like to be able to use the wi-fi and non-network features of my iPhone 3gs, but none of the Phone/3G/anything that would charge high roaming fees (basically use it like an iPod touch for the week). Is t
-
Help My ipad mini's screen turned black afther doing an update from a program can anybody tell me what to do?
-
How to patch de Oracle 8.1.7 database without invalidating Portal?
Hi I have an existing Oracle 8.1.7 database with Portal 3.0.8. I installed the upgrade script to take it to 3.0.9 but there is a requirement to install patch 2 of Oracle 8.1.7. But everytime a patch de database the objects from the portal schema gets