Can i show 10,000 of rows in jtable
hello,
can i show 10,000 (>10,000) of rows of data (from databases)in jtable at time.
thanks
daya
if you want to increase the memory, you have to start a new JVM. This is the way I have always maximized the memory:
public static void main(String[] args)
try
if(Runtime.getRuntime().maxMemory() < 64*1024*1024) //64 megabytes ; I think the default is about 32 ?
Process p = Runtime.getRuntime().exec(new String[]{"java","-Xmx512m","-Xms512m",getClass().getName()}); //512 megabytes; however much you want, just watch your greed =D
new ThreadGobbler(p); //defined below
return;
}catch(IOException e) { e.printStackTrace();}
// now start your usual main() ...
}what that snippet of code does is check to make sure you have at least 64 megabytes of memory. If you do not, the program re-runs with the specified args - the Xmx sets the max memory, and Xms sets the min memory (I think...). Not quite sure what the differences are, but it works =D
anyway, the thread gobbler is used just to redirect output and input to the default System.out and System.err. If you do not need to redirect, just delete/comment out the line above. (I don't know if this is the most elegant way to do it because lines are lost if the streams madly flush data, but...)
class ThreadGobbler
private Process process;
private BufferedReader std, error;
public ThreadGobbler(Process toDo)
process = toDo;
std = new BufferedReader(new InputStreamReader(process.getInputStream()));
error = new BufferedReader(new InputStreamReader(process.getErrorStream()));
new Thread()
public void run()
try{
checkError();
catch(IOException e){
System.err.println("Error in error reading.");
System.exit(1);
}.start();
new Thread()
public void run()
try{
checkStd();
catch(IOException e){
System.err.println("Error in std reading.");
System.exit(1);
}.start();
public void checkError() throws IOException
String error;
while((error = this.error.readLine())!=null)
System.err.println(error);
public void checkStd() throws IOException
String std;
while((std = this.std.readLine())!=null)
System.out.println(std);
}Hope that helps! If you have any questions, just reply =D
Alex
Similar Messages
-
BEx analyzer shows 0,000 in rows, but 0,5 in total
Hi Experts,
In BEx Analyzer my query shows 0,000 for a key figure in 3 rows, but in total of these 3 rows there is 0,5 %. The key figure is used as an attribute to a custom characteristic. When I display the characteristic, I see values 0,1 + 0,2 + 0,2 which gives correct total. If I display more decimal places in Bex, it is still the same like 0,00000.
We are on SAP BI 7.1 SP 06. Can anybody help?
MichalProblem was solved via OSS note 675235.
transaction SPRO:
-> BW Customizing Implementation Guide
-> General settings
-> Check units of measurement
-> Select the Units of measurement button and set decimal places rounding.
Michal -
How can I show a particular VO row during pageload?
I have a page to display the employee details. I get the current employee from the adf security username. How can i integrate this value with my empdetailsVO so that when I open the profile page of the logged in employee I can show his details?
Hi,
here's how you want to achieve this:
1. As Timo said, create View Criteria that queries employees by their username (e.g. mail address)
2. Make sure the View Criteria uses a bind variable (say usernameVar)
3. Set the bind variable type to "Expression" (not Literal) value
4. set the default value to adf.securityContext.username
5. Open the AM and go to the Data Model section
6. Create an instance of the Employee View Object
7. Select the View Object instance and and choose edit from teh context menu
8. Assign the View Criteria to the VO instance
9. Create the form on the page from this VO instance
Frank -
I have strucked with a simple but a complex problem.
I have a Report with data in vertical rows..need of the hour is how can we show that data into column structure.
here is the table sample which i have in Database..
Location chrg_type Effective_date
xxxxxxx xxxx xx-xx
thhis is the structure in effective date we have several months in it in a single column i want show the effective date or effective month in various columns instead of a single column.
my required table is....
Effective_date Effective_date
Location chrg_type xx-xx xx-xx
xxxxxxx xxxx xx-xx
any tough heads?????Hi Sunil,
Your 1st problem is that you are going to need one more field to accomplish you goal. What type of data do want under your new date columns?
Anyway, once you have that you need to move on to how to move the data out into columns based on date.
Try something like this.
0_Date = IF DATEPART('m',{tbl.Effective_date}) = DATEPART('m',CurrentDate) AND
DATEPART('yyyy',{tbl.Effective_date}) = DATEPART('yyyy',CurrentDate)
THEN {tbl.DataField}
1_Date = IF DATEPART('m',{tbl.Effective_date}) = DATEPART('m',DATEADD('m', -1, CurrentDate)) AND
DATEPART('yyyy',{tbl.Effective_date}) = DATEPART('yyyy',DATEADD('m', -1, CurrentDate))
THEN {tbl.DataField}
2_Date = IF DATEPART('m',{tbl.Effective_date}) = DATEPART('m',DATEADD('m', -2, CurrentDate)) AND
DATEPART('yyyy',{tbl.Effective_date}) = DATEPART('yyyy',DATEADD('m', -2, CurrentDate))
THEN {tbl.DataField}
... Repeat this process until you have all of the columns you need, following this format.
Hope this works for you,
Jason -
I created a slideshow and when I went back to look it plays the music but not the pictures - I can see them in the top row but they don't show up even if I click on them - music still plays!
With the amount of information you've provided it's impossible to offer a potential solution. We can't see your computer so we need to know the details of your problem and setup, i.e.:
what version of iPhoto are you using?
what system version are you running?
are you able to view the photos in full size in the library?
what fixes have you tried?
where is your library located?
did you apply any updates or upgrades just prior to the problem occurring?
are you running a "managed" or "referenced" library?
what type of Mac?
how much free space on your boot drive?
OT -
How can I show additional tab rows when using many open tabs?
How can I show additional tab rows when using many open tabs?
What method (code) did you use to get the Tab bar displaying in the space used for the Navigation Toolbar (location bar)?
The Tab bar should be displayed above the Navigation Toolbar.
Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
*Do NOT click the Reset button on the Safe Mode start window.
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes -
Can not show the JCheckBox in JTable cell
I want to place a JCheckBox in one JTable cell, i do as below:
i want the column "d" be a check box which indicates "true" or "false".
String[] columnNames = {"a","b","c","d"};
Object[][] rowData = {{"", "", "", Boolean.FALSE}};
tableModel = new DefaultTableModel(rowData, columnNames);
dataTable = new JTable(tableModel);
dataTable.getColumnModel().getColumn(3).setCellEditor(new DefaultCellEditor(new JCheckBox()));
But when i run it, the "d" column show the string "false" or "true", not the check box i wanted.
I do not understand it, can you help me?
Thank you very much!
coral9527Do not use DefaultTableModel, create your own table model and you should implement the method
getColumnClass to display the boolean as checkbox ...
I hope the following colde snippet helps you :
class MyModel extends AbstractTableModel {
private String[] columnNames = {"c1",
"c2"};
public Object[][] data ={{Boolean.valueOf(true),"c1d1"}};
public int getColumnCount() {
//System.out.println("Calling getColumnCount");
return columnNames.length;
public int getRowCount() {
//System.out.println("Calling row count");
return data.length;
public String getColumnName(int col) {
return columnNames[col];
public Object getValueAt(int row, int col) {
return data[row][col];
* JTable uses this method to determine the default renderer/
* editor for each cell. If we didn't implement this method,
* then the last column would contain text ("true"/"false"),
* rather than a check box.
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
* Don't need to implement this method unless your table's
* editable.
public boolean isCellEditable(int row, int col) {
//Note that the data/cell address is constant,
//no matter where the cell appears onscreen.
return true;
* Don't need to implement this method unless your table's
* data can change.
public void setValueAt(Object value, int row, int col) {
data[row][col] = value;
fireTableCellUpdated(row, col); -
Can we show blank lines for transient VO?
I'm a newbie.. Using JDev 11.1.1.2.0.
I have a requirement like this (simplified): On first page show an editable table with 2 columns: part no and date, and 10 blank rows. On hitting submit, it should go to a second page which has the part number, date, and price (from database API).
I went thru storefrontdemo example and I see they have used a transient VO for the cart. So I created a transient VO with 3 attributes - part number, date and price. Also created an AM method in the Impl class to get the price for a part/date combination.
Few questions:
1. How can I show the first page with blank rows? When i drag and drop the VO from data control palette as an editable table, I get no rows.
2. Is it wise to invoke the AM method for each row and populate the price on the transient VO attribute? Will the transient VO values display on the second page, assuming both the first and second pages are in a task flow?
Thanks in advance!
Kalp
Edited by: user514831 on Jan 17, 2011 1:56 PMAnswering my own question - I just added a CreateInsert operation from data control palette and rewired the "Method" to a custom bean that does something like:
Row row = vo.createRow();
vo.insertRow(row); -
How can I make the rolumn and row headers appear on the printed sheet?
I am working in Numbers'09. I want to print out my chart with the column letters and row numbers showing.
How can I make the rolumn and row headers appear on the printed sheet?g,
Those annotations are called "Labels", and they are only visible during editing when a cell selection is made within the table. If you need to have the labels on your final output, you can create labels in Text Boxes and position them adjacent to the table.
Jerry -
Can we find the number of rows in table from the dump file
Hi All,
Can we find the number of rows in table from the dump file with out importing the table in to the database?
Please let me know ,if any option is there.
Thanks,
Kumar.<s>Try to import with option SHOW=Y, that should skip the number of rows which are into a table from a dump file.</s><br>
<br>
Nicolas.<br>
Oops, sorry, that doesn't show the number of lines...<br>
Message was edited by: <br>
N. Gasparotto -
How can we show selected values of a tree in a selectmanylistbox
how can we show selected values of a tree in a selectmanylistbox??
Hi,
you can use a reference to a RichTree component instance and call getSelectedRowKeys on it. The selected rowKey then allow you to look-uo the nodes in the tree. You can use a custom selection listener on the tree to be notified about each selection. There also is an API for the de-selected row keys, which you need to remove nodes from the select many list. The select many list will get its data from a managed bean in view scope (so the values survive subsequent requests)
Frank -
Carrier logo sometimes shows as 000-00 and loses signal
Hiya,
My girlfriends iphone 5 sometimes loses all signal and the carrier shows as 000-00 rather than EE. Regardless of signal in the area, the only way to get a signal back is to restart the phone!
The phones not jailbroken or anything and is only about a month old. Its running the latest iOS.
Any ideas?No I don't think its necessarily because of the 4G rollout.
My iPhone5 has a Orange/EE 3G sim card and contract.
This is what my theory is...
My iPhone5 is set to automatically select the best network. It can see the 4G EE network is available, but when it connects via my 3G sim card it glitches / nullifies the signal and just reports that weird 000-00.
Ever since I turned off 4G / LTE in settings I have not had the 000-00 error.
So now it isn't getting confused with 4G and 3G signals, it doesn't give the error.
So my theory is supported by my experience.
Out of curiosity, is everyone who is having this problem absoloutely sure they have 4G sims??? I got my iPhone on release day, as a new contract, assumed it was 4G and only found out after a customer service phonecall much later that infact the new contract I had taken out was only a 3G one despite it being a brand new contract with an iPhone5 (yet that was one of the selling points by Orange / EE.) -
Can you show me an example about %=navop%
Hi all,
On the <jbo:RowsetNavigate I found this:
Tip: You can also set the action parameter at runtime by using an expression such as
<%=navop%>. You would pass the action value to the RowsetNavigate tag from another portion of your page.
I guess this is used in conjunction with <jbo:OnEvent list=first,next, ..... > in order to not repeating code and reuse the same portion of code in navigating actions.
Can you show me how can I get the value <%=navop %> in order to pass it to the tags (i.e. <jbo:ROW action=<%=navop%>), in the submiting form?
Thanks.this is just a local variable to the JSP page you can pass it as a request parameter and retrieve it as follows:
<%
String navop = request.getParameter("navigation"); // this is your variable name
%> -
Can crosstab show multiple objects in top header?
can crosstab show multiple objects in top header?
for example, the data showed as :
customer city name city value product name product value
A Paris 1 food N
A London 2 milk T
B London 3 food E
B Paris 4 milk M
C London 6 food W
C Paris 3 milk Q
D London 1 food E
D Paris 2 milk R
i want show these data in crosstab, and customer is the left header, city name and product name are the top header, and city value and product value are measures in the crosstab,
and i want show the data as below:
London Paris food milk
A 2 1 N T
B 3 4 E M
C 6 3 W Q
D 1 2 E R
but actually i got below result in crosstab:
London food London milk Paris food Paris milk
A 2 T 1 N
B 3 E 4 M
C 6 W 3 Q
D 1 E 2 R
anyone can help me on this?
thanks.Can you see this image?
https://weblogs.sdn.sap.com/weblogs/images/252123862/trick2.JPG
The steps I did to get it were:
1. Insert a crosstab. In the first column put this formula
=[customer]
2. In the blue row cell do not put the city name directly but this formula:
="*London*"
3. Add 3 columns. In each blue cell (header cells) put this formulas: ="Paris", ="food"
, ="*milk*"
4. Now, in the white cells:
In the first column put this formula:
=Max([city_value] Where ([city_name]="London"))
In the second
=Max([city_value] Where ([city_name]="Paris"))
In the third column:
=Max([product value] Where ([product_name]="food"))
In the fourth column:
=Max([product value] Where ([product_name]="milk"))
Sadly this is not dynamic as you can see, but is the only way to achieve what you want to display.
Otherwise better follow the advice by the other posters.
Edited by: PadawanGirl on Mar 2, 2011 5:48 PM -
ADF Bar Graph Series Rollover Hint : show 3.000 and what I want is 3.
I've got an ADF bar chart(JDeveloper 11.1.2.1.0), which it always show 3.000 and what I want is 3.
My bar code as followed:
<dvt:barGraph id="graph2" value="#{bindings.EmployeeVO2.graphModel}"
subType="BAR_VERT_CLUST" animationOnDisplay="auto" threeDEffect="true"
seriesRolloverBehavior="RB_HIGHLIGHT" partialTriggers="::graph1"
dynamicResize="DYNAMIC_SIZE" inlineStyle="vertical-align:baseline;">
<dvt:background>
<dvt:specialEffects/>
</dvt:background>
<dvt:graphPlotArea/>
<dvt:seriesSet>
<dvt:series/>
</dvt:seriesSet>
<dvt:o1Axis/>
<dvt:y1Axis/>
<dvt:legendArea automaticPlacement="AP_NEVER"/>
<dvt:y1TickLabel scaling="none" autoPrecision="off"/>
<dvt:markerText>
<dvt:stockVolumeFormat scaling="none" autoPrecision="off">
<af:convertNumber type="currency"/>
</dvt:stockVolumeFormat>
<dvt:x1Format scaling="none" autoPrecision="off">
<af:convertNumber type="currency"/>
</dvt:x1Format>
<dvt:y1Format scaling="none" autoPrecision="off">
<af:convertNumber maxIntegerDigits="5" minFractionDigits="0"
maxFractionDigits="0" minIntegerDigits="1"/>
</dvt:y1Format>
<dvt:zFormat scaling="none" autoPrecision="off">
<af:convertNumber/>
</dvt:zFormat>
</dvt:markerText>
</dvt:barGraph>Thanks all. The pie chart is pretty right already; I've used the sliceLabel and numberFormat to produce something that's pretty close as mentioned earlier:
<dvt:sliceLabel>
<dvt:graphFont color="#ffffff"/>
<dvt:numberFormat
scaleFactor="SCALEFACTOR_NONE"
numberType="#{AdminCaseload.chartOptionAmountTypeInt}"/>
</dvt:sliceLabel>
... but by using the managed bean to set the numberType to NUMTYPE_CURRENCY when $$ are charted, the rollover hint now displays as I want with the $, but the LD_PERCENT (default) slice labels over the chart are now displaying as $20% which seems a bit crazy. How can I show the currency symbol against the value in the rollover hint, without it appearing alongside the LD_PERCENT slice label in the chart?
On the bar charts, what I need to be able to do is find an sliceLabel equivalent tag location for the numberFormat. You'd think it would be the dvt:y1Axis, given that it doesn't want to let you insert a numberFormat inside either the seriesSet or series tags. How do we control formatting of the value rollover hints on a bar chart ?
Thanks in advance.
Maybe you are looking for
-
Help me understanding server memory usage
I am trying to determine how much memory our weblogic server needs and am seeing what seems to me to be strange memory growth patterns in the server. I am running weblogic6.1sp4(with CR093850) on solaris 2.7. I have written an emulator for testing pe
-
Photoshop CS4 will not open, when I try and open it I get "An unexpected and unrecoverable problem has occurred because of a disk error. Photoshop will now exit." Bridge is working fine?
-
Since Hotmail was converted to Outlook I can only access through the Mobile option. I keep getting a message suggesting I upgrade to the latest version of Safari. I tried downloading the most recent upgrade that I could find but the problem is stil
-
All images in the app store are blank except a blue question mark in the middle. Any ideas why i cannot see the images?
-
Extract Data in Power Pivot from MDX with diffrentnt different Level of Hierarchy in MDX
Hi All, My requirement is to extract the data form tabular model and put in power pivot,as all the measures calculation is present in model just extracting the aggregated data. Issue is appearing on Rolling up the data, so is there any way to extract