Help!How do a customizer about array in JTable?
I do a class that extend JTable and i do a customizer,
it is right when i set a property of String type,but some property are array(for example :int[] or String[];),
how set array property?thanks!
in a word,my problem is : if a property is array how
to do a customizer and raise(make) source code ?Hi again,
if only you would use java-terms sigh - I guess, with a property you mean data in a tablecell and a customizer is a TableCellRenderer resp. a TableCellEditor, right?
The Java-Online-Tutorial available here has good examples for creating cellrenderer and celleditors - it is a good idea to read this and work on the examples - it is too much for a topic in the forum if you are not familiar with it.
Perhaps you mean that a row in the table is expressed by an array - in this case you had to create your own TableDataModel and implement the methods the JTable uses to communicate with this model - e.g. the getValueAt(row,column)-method to get a value - in such a method you can pass the value of an element of your array-structure for example.
All these things are explained in the tutorial that is available from the Docs & Training link left-up. It would be a good idea to read and work on it.
greetings Marsian
Similar Messages
-
Hi, I need help. I have several groups of data for input, and need to use them later in the same or different code. When I key in the input data, the code will ask the number of data group first, then in each group, there will be 6 data to key in, each has a specific variable name. The number of group and the data for each group will vary at each time running the code. The data group needs to be numbered sequently. After having all groups of data, these data will be sent to another sub VI to read. This sub VI needs to know each group number and each data of a group.
I think I should create a 2-D array to read these data in a do loop, but I can't let my do loop read data in each time. Then when I sent the data out, the next sub VI was confused by the sequence of the data group and the sequence of data in each group. Can someone help me or give me some example how to do it? Thank you very much for your help.
Message Edited by ccyang on 06-06-2006 10:37 AMFrom what I understand of your explanation, an event structure might be
the way to go (LV 6+ I think). Events could be based off of
keypresses in a particular control (a 2D array like you mentioned), and
once input in that particular field is complete, the user presses say
the 'enter' key, and you can use the "VKey" of the event data node to
determine which key is pressed (i.e. VKey = enter?). From there,
you would continue to the next portion of data entry or processing of
entered information.
Hope this helps. -
Help, how would I store an array of objects ?
im doing a java project on creating a music database, i need to store an array of cd objects, each entry in the array will be a single object for a cd.
The objects are: Artist, Album, No of tracks
could sum1 point me in d right direction, thanksThis is the wrong forum. Please ask again in the [new to java forum|http://forum.java.sun.com/forum.jspa?forumID=54] .
Assuming you want to store them on disk, you can either use a database (java technologies for this is JDBC and JPA ) or write them to a file using the java technologies Serialization or Beans Persistence. -
How do I customize the CNN and Wall street journal apps on my iPhone 6 to only show news about business and technology, and not shootings or murders?
First, we are not Apple, we are other users like you trying assist with hardware problems. We cannot help with warranty issues.
Unfortunately, Apple cannot and will not help you unless your iPhone is returned to the US (in person, not by international mail). The warranty is not international. This topic has been discussed on this forum since before the 5s was released. Please tell all of your friends not to buy an iPhone in another country unless they are willing to forego warranty and service from Apple. -
I need to reformat my computer and I will loose my itunes, How do I go about getting all my apps free and paid back when I reinstall everything (Please someone help)
Have you failed to backup your computer?
If so, then you will have to redownload.
Downloading past purchases from the App Store, iBookstore, and iTunes Store -
hi can someone keep this simple for me! my iPhone is due for a renewal. but my old laptop that it is backed up to no longer works! how do i go about saving all my songs pics etc to a new laptop without losing anything? please help!!!
Syncing to a "New" Computer or replacing a "crashed" Hard Drive
-
His there I want to change my iTunes password because I forgot it how do I go about this?? HELP!!
Reset your Apple ID password
https://support.apple.com/en-us/HT201487 -
i just updated my 3gs to iOS5 and it keeps on saying cannot activate iphone.. after searching videos how to activate it.. i can't tap my three fingers because there is no clock showing on my screen. how do i go about it? help please.
i have the exact same problem and im still currently trying to figure out how to activate it
-
My macbook crashed about two weeks ago and I had icloud already set up. How do I go about retrieving the music and images? Please, help me. I had over 10gb of music on that computer and the only place it was backup was icloud. Thanks.
I hate to say this, but unless you are paying the 25 bucks you cannot back up your library to the cloud.
All you can do is back up the items you "purchased" from Apple.
iTunes Match
For $24.99/year you’ll get access to all your iTunesmusic including tunes you ripped from CDs or “borrowed” from anonymous friends. It scans your library to see if the song exists in iTunes’ 18 million song catalog and if it does it’ll stream it to you at 256 kbps. If your song is not in iTunes then it’ll be uploaded to iCloud at whatever rate it is on your device where it can be streamed for your listening pleasure. I cannot find any information on how to restore a library, however
Best of luck -
Dear All.
Help Me...
English is not very good. Google translator is used.
How do I pass an array of strings?
Please refer to the VB program
===========================================
Private Sub m_btn_Click()
Dim nReturn As Long
Dim sPpid As String
Dim sMdln As String
Dim sSoftRev As String
Dim nCount As Long
Dim saCCodes(2) As String
Dim naPCount(2) As Long
Dim saPNames(10) As String
sPpid = "PPID001"
sMdln = "Mdln"
sSoftRev = "Rev001"
nCount = 2
saCCodes(0) = "1"
naPCount(0) = 5
saPNames(0) = "Param001"
saPNames(1) = "Param002"
saPNames(2) = "Param003"
saPNames(3) = "Param004"
saPNames(4) = "Param005"
saCCodes(1) = "2"
naPCount(1) = 5
saPNames(5) = "Param006"
saPNames(6) = "Param007"
saPNames(7) = "Param008"
saPNames(8) = "Param009"
saPNames(9) = "Param010"
nReturn = m_XGem.GEMReqSend(sPpid, sMdln, sSoftRev, nCount, saCCodes(0), naPCount(0), saPNames(0))
If (nReturn = 0) Then
Call Me.AddMessage("[EQ ==> XGEM] GEMReqSend successfully")
Else
Call Me.AddMessage("[EQ ==> XGEM] Fail to GEMReqSend (" & nReturn & ")")
End If
End Sub
=================================================
nCount, naPCount enough saCCodes, saPNames value must be sent.
How to handle an array of strings in LabView is impatient.
I want to VB program implemented in LabView.Have you actually tried to right click on the according node parameter and select Create->Constant or Create-Control??
And I don't see any string array in the parameter list. That are all simple strings and the VB code in your first post clearly shows that the call to the function only indexes the first element of those arrays to be passed to the function, not the entire array.
If the function really reads arrays despite being declared as only taking strings then it is using some weirdo VB trickery and there will be no way to replicate that in LabVIEW.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Help, How about the price about the computer components in Toronto
help, How about the price about the computer components (CPU,
RAM and so on...) shall I bring CPU and RAM to Toronto?
I am Chinese. I live in shanghai...
And, are there some websites which provide computer hardware price information?
I really appreciate your help.Check out some of the major retailers for a general idea:
www.futureshop.ca
www.staples.ca -
Ok so I have a free standing iSight Cam, is it possible to use it with my white MacBook ? and if so how do I go about it ? I've tried researching for updates, drives but need help. Can someone give me some direction ?
jpatricio787 wrote: ... is it possible to use it with my white MacBook ?...
OK so yes, but if, and only if:
(1) your MacBook has a Firewire port (not all do)
- and -
(2) your old external iSight camera works (not all do)
- and -
(3) your MacBook is working properly.
If you are not certain whether your MacBook model has Firewire, you can search MacBook Technical Specifications for your model. Alternatively, check the User Guide Manual that came with your MacBook for the information you need to be certain.
If you are not certain that your old external iSight camera works, you can test it using the suggestions in this link.
jpatricio787 wrote: ... if so how do I go about it ? ...
Follow the instructions in your iSight User's Guide to connect and turn on the iSight. Then launch the Apple app you want to use with your iSight. If you need more information about using an app, search for "camera" (without the quote marks) in the Help menu choice for the app.
jpatricio787 wrote:... Can someone give me some direction ?
If you need more direction, post back the specifics of what you still need. We will offer further direction based on the details of your reply.
Message was edited by: EZ Jim
Mac OSX 10.9.3 -
I'm trying to upgrade to the OS X lion, and it says I need to have a Intel Core 2 duo. I currently have a 2 GHz Intel Core duo. How do I go about making the change? Any help would be appreciated. Thanks, Kevin
I was afraid of that.... Thanks for helping!
-
JPDK customize/about/help language
I installed JPDK from March into my Portal 3.0.7.6.2.
Now when I have a Java-Portlet (e.g. Hello World - Servlet Renderer) on my page I get the wrong langauge for "customize", "about" and "help". I get always "Anpassen" ,... because my Jserv is started in a german environment. But when I start Jserv in an english envornment and I try to display a german page I get "customize", ...
What's wrong? Or does this not work?This looks like a bug.
The JPDK is attempting to the accept-language from the Portal request instead of the portal language that is sent as a parameter. If the accept-language is not passed by the portal then the JPDK will default to the JVM default language - the behaviour you are seeing. -
Please help how to get return array from rpg program on java code?
Hi
I have created a rpg program that returns 2 parameter 1 is the id and another one is list of array, when I called this program I passed two programparameter from my java code (see the code below) but when i checked what value would be return it is returned only first value of array. how will i get all array values ?
please suggest me regarding this issues I amn't so much aware on java & AS400.
try
ProgramParameter[] parmList = new ProgramParameter[2];
AS400Text p1 = new AS400Text(10);
AS400Text p2 = new AS400Text(30);
try
parmList[0] = new ProgramParameter(10);
parmList[1] = new ProgramParameter(30);
parmList[0].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
parmList[1].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
parmList[0].setInputData(p1.toBytes("Pune"));
parmList[1].setInputData(p2.toBytes(" "));
catch(Exception ex)
ProgramCall pgm = new ProgramCall(o);
pgm.setProgram("/QSYS.LIB/XXX/XXX.PGM",parmList);
if (pgm.run())
byte s[] = parmList[1].getOutputData(); // HERE I got only first value of returning array.
parmList[1].getOutputDataLength();
//String sts = ((String) (new AS400Text(10,o).toBytes(s[0])));
else
AS400Message[] messageList = pgm.getMessageList();
for (int msg = 0; msg < messageList.length; msg++) {
catch(Exception ex)
AS400Message[] messageList = null;
finally
o.disconnectAllServices();
Reply With QuoteTry this :
try
ProgramParameter[] parmList = new ProgramParameter[2];
AS400Text p1 = new AS400Text(10);
AS400Text p2 = new AS400Text(30);
AS400Array arrP2 = new AS400Array(p2, 4);
try
parmList[0] = new ProgramParameter(10);
parmList[1] = new ProgramParameter(30);
parmList[0].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
parmList[1].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
parmList[0].setInputData(p1.toBytes("Pune"));
parmList[1].setInputData(arrP2.toBytes({"","","",""}));
catch(Exception ex)
ProgramCall pgm = new ProgramCall(o);
pgm.setProgram("/QSYS.LIB/XXX/XXX.PGM",parmList);
if (pgm.run())
Object[] objArr = (Object [])arrP2.toObject( parmList[1].getOutputData() );
for(int i =0; i<objArr.length;i++){
System.out.println( " SKU " + i +" : " + objArr.toString());
else
AS400Message[] messageList = pgm.getMessageList();
for (int msg = 0; msg < messageList.length; msg++) {
catch(Exception ex)
AS400Message[] messageList = null;
finally
o.disconnectAllServices();
Maybe you are looking for
-
If i go to googles page type in what i am searching for and then hit the "search" button in the bottom right of my keyboard it does nothing I have updated my iphone to newest OS 5.1.1 and I have rolled it back to a year ago and nothing works. If some
-
Send a mail with in Attach a formatted XLS
Hello gurus, i have this problem. I send an email with an XLS attach using the function SO_NEW_DOCUMENT_ATT_SEND_API1. Into the XLS file I put two currency type columns. The problem is that using this function when i open the XLS file the currency va
-
Images too dark when I watch a movie
Movies almost completely dark. We see less and less. The moniter brightness is at 100%. It's now to the point that watching a movie is no longer enjoyable.
-
My email address attached to my Apple id in iCloud won't work
-
How do I reinstall PhotoBooth on a 10.8.1?
After migrating from my old HD to a new iMac with 10.8 (now 10.8.1) my PhotoBooth disappeared. It's still on the old HD, but when I copy it to the new iMac it tells me it won't work with my version of OS X. And in Small letters "You have PhotoBooth 4