Displaying 2 tables in 1 frame
Hi guys,
I have this problem. I need to display 2 tables (with scroll panes) on a frame. I have tried it a couple of different ways.
1) Using 1 JPanel that has 1 table and then adding that and another table to a JFrame (GridLayout)
2) Using GridLayout on a JPanel and adding that to a JFrame
3) Using 2 JPanel and adding it to a JFrame
4) Placing both JTables on 1 JPanel and then adding that to the JFrame
but it doesn't work. It seems that the table that is added first (not to mention the buttons and textfields) doesn't appear (not visible) only the 2nd table is visible.
This this the latest "version" I've tried.
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.table.TableColumn;
public class Main {
//Variable declarations
private JFrame f;
private JScrollPane ladderSP, resSP;
private JPanel p0, p1;
public Main() {
createTable();
createResTable();
createPanelZero();
createPanelOne();
createAndShowGUI();
private void createAndShowGUI() {
f = new JFrame("Calculate MW");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setLayout(new GridLayout(1,2));
f.setLocation(100, 100);
f.add(p0);
f.add(p1);
f.pack();
f.setResizable(false);
f.setVisible(true);
private void createPanelZero() {
p0 = new JPanel(new GridLayout(1,2));
p0.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
p0.add(ladderSP);
p0.add(resSP);
private void createPanelOne() {
p1 = new JPanel(new GridLayout(1,1));
p1.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
p1.add(resSP);
private JTextField setObjSize (JTextField com) {
Dimension d = new Dimension(80, 23);
com.setPreferredSize(d);
com.setMaximumSize(d);
com.setMinimumSize(d);
return com;
private void createTable() {
// Variables
String[] colNames = {"Molecular Weight", "Length (cm)"};
String[][] data;
data = getLadder(new File("ladder.txt"));
JTable table = new JTable(data, colNames);
table.setPreferredScrollableViewportSize(new Dimension(220, 300));
// Set 1st column uneditable
JTextField tf = new JTextField();
tf.setEditable(false);
TableColumn wtCol = table.getColumnModel().getColumn(0);
wtCol.setCellEditor(new DefaultCellEditor(tf));
// Set the table width
table.setColumnSelectionAllowed(false);
table.getTableHeader().setResizingAllowed(false); //not allowing resizing of columns
table.getTableHeader().setReorderingAllowed(false); //not allowing reordering of columns
table.setRowSelectionAllowed(false);
ladderSP = new JScrollPane(table);
private void createResTable() {
String[] colNames = {"Partition", "Molecular Weight"};
String[][] data = new String[1][1];
JTable table = new JTable(data, colNames);
table.setPreferredScrollableViewportSize(new Dimension(220, 401));
//table.setEnabled(false);
table.setRowSelectionAllowed(false);
table.getTableHeader().setResizingAllowed(false);
table.getTableHeader().setReorderingAllowed(false);
resSP = new JScrollPane(table);
//resSP.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
private String[][] getLadder(File file) {
String line;
String[] temp = new String[2];
String[][] sA = new String[30][2];
int x = 0;
try {
BufferedReader reader = new BufferedReader(
new FileReader(file));
while ((line = reader.readLine()) != null) {
if (line.length() > 0) {
temp = line.split("\\t");
sA[x][0] = temp[0];
sA[x][1] = temp[1];
x++;
catch (IOException e) {
System.out.println(e.getStackTrace());
System.out.println(e.getMessage());
String[][] tempArr = new String[x][2];
for (int y=0; y<x; y++) {
tempArr[y][0] = sA[y][0];
tempArr[y][1] = sA[y][1];
return tempArr;
public static void main(String[] args) {
Main black = new Main();
}There are labels and textfields and such but I've cut them out because it seems that having 2 JTables causes the problem to happen.
Am I doing something wrong?
Thanks.
Desmond
Oh damn I forgot about that, sorry.
Here is the code again (amended). I've added all the JComponents and made it independent of external sources.
Does anyone else have this problem or is it only me?
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.table.TableColumn;
public class Main {
//Variable declarations
private JFrame f;
private JScrollPane ladderSP, resSP;
private JPanel p0, p1;
public Main() {
createTable();
createResTable();
createPanelZero();
createPanelOne();
createAndShowGUI();
private void createAndShowGUI() {
f = new JFrame("Calculate MW");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setLayout(new GridLayout(1,2));
f.setLocation(100, 100);
f.add(p0);
f.add(p1);
f.pack();
f.setResizable(false);
f.setVisible(true);
private void createPanelZero() {
p0 = new JPanel(new GridBagLayout());
p0.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
//set global gridbag constraints
GridBagConstraints c = new GridBagConstraints();
c.anchor = GridBagConstraints.EAST;
c.insets = new Insets(1, 1, 0, 1);
//length label
JLabel lengthLabel = new JLabel("Length (cm): ");
c.gridx = 0;
c.gridy = 0;
p0.add(lengthLabel, c);
//length text field
JTextField lengthTF = new JTextField();
lengthTF = setObjSize(lengthTF);
c.gridx = 1;
c.gridy = 0;
p0.add(lengthTF, c);
//partition label
JLabel partitionLabel = new JLabel("Number of partititons: ");
c.gridx = 0;
c.gridy = 1;
p0.add(partitionLabel, c);
//partition text field
JTextField partitionTF = new JTextField();
partitionTF = setObjSize(partitionTF);
c.gridx = 1;
c.gridy = 1;
p0.add(partitionTF, c);
//ladder label
JLabel ladderLabel = new JLabel("Ladder: ");
c.gridx = 0;
c.gridy = 2;
p0.add(ladderLabel, c);
//ladder combo box
JComboBox ladderCB = new JComboBox();
Dimension d = new Dimension(80, 23);
ladderCB.setPreferredSize(d);
ladderCB.setMaximumSize(d);
ladderCB.setMinimumSize(d);
c.gridx = 1;
c.gridy = 2;
p0.add(ladderCB, c);
//calculate button
JButton button = new JButton("Calculate");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//blah
c.gridwidth = 2;
c.fill = GridBagConstraints.HORIZONTAL;
c.gridx = 0;
c.gridy = 3;
p0.add(button, c);
//table
c.gridx = 0;
c.gridy = 4;
p0.add(ladderSP, c);
private void createPanelOne() {
p1 = new JPanel(new GridLayout(1,1));
p1.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
p1.add(resSP);
private JTextField setObjSize (JTextField com) {
Dimension d = new Dimension(80, 23);
com.setPreferredSize(d);
com.setMaximumSize(d);
com.setMinimumSize(d);
return com;
private void createTable() {
// Variables
String[] colNames = {"Molecular Weight", "Length (cm)"};
String[][] data = {
{"220", "2.1"},
{"160", "2.7"},
{"120", "3.4"},
{"100", "3.75"},
{"90", "3.95"}
JTable table = new JTable(data, colNames);
table.setPreferredScrollableViewportSize(new Dimension(220, 300));
// Set 1st column uneditable
JTextField tf = new JTextField();
tf.setEditable(false);
TableColumn wtCol = table.getColumnModel().getColumn(0);
wtCol.setCellEditor(new DefaultCellEditor(tf));
// Set the table width
table.setColumnSelectionAllowed(false);
table.getTableHeader().setResizingAllowed(false); //not allowing resizing of columns
table.getTableHeader().setReorderingAllowed(false); //not allowing reordering of columns
table.setRowSelectionAllowed(false);
ladderSP = new JScrollPane(table);
private void createResTable() {
String[] colNames = {"Partition", "Molecular Weight"};
String[][] data = new String[1][1];
JTable table = new JTable(data, colNames);
table.setPreferredScrollableViewportSize(new Dimension(220, 401));
table.setEnabled(false);
table.setRowSelectionAllowed(false);
table.getTableHeader().setResizingAllowed(false);
table.getTableHeader().setReorderingAllowed(false);
resSP = new JScrollPane(table);
public static void main(String[] args) {
Main black = new Main();
}
Similar Messages
-
Display Column & Table Headings in Pivote Table
Hi,
Can we display the Table Headings in Pivote Table ??
There is an option of displaying the same in Table view,is there any way of displaying the same in Pivot Table View??
ThanksHi,
Try this.
Table heading:-
We do not have any direct option to do this.
But as a workaround, we can achieve this using the following approach.
Add a column to the criteria. Use the following in the column formula.
'<table width="100%" align="center" bordercolor="#C9CBD3"
frame="void" rules="cols" cellpadding="0" cellspacing="0">
<tr>
<td align="center" width = "200">
'|| 'This Month' ||' </td>
<td align="center" width = "200">
'|| 'Accumulated YTD' ||'</td>
</tr>
</table>'
Where This Month & Accumulated YTD are the table headings.
Do not forget to change the Data Format to 'HTML'
Place this column on top of measures labels in Columns Section.
But, you need to fix the width of all the measure columns and adjust the <td> width accordingly.
"Display Column & Table Headings" equivalent for pivot tables?
Hope this help's
Thanks,
Satya -
Automatic Payment program -line item cleared not displaying in table
automatic Payment program -line item cleared not displaying in table
i have re run the APP program DUSR1 same earlier it has run twice but table dose not show double payment to vendors how to resolve the issue.
Can some one please guide me on this.Hi Priyanka,
First, which table are you referring to. If your fist APP run clears the line item, it will no longer be available in the open item.
Please be more specific on the problem so that we can try to help you. If possible, please provide screenshots.
Regards,
Ganesh -
How to display a table after clicking on a chart in ssrs?
Hi all experts,
I need to display a table control after clicking on a chart.
I was looking for the visibility property of the table which can be set based upon click on the bar chart.
Please respond asap...Hi Manisha,
If I understand correctly, you want to control the table visibility through clicking the chart. In this case, please refer to the detailed steps below:
1. Create the parameter named Control, check the Boolean option in the drop-down list of the Data Type, and select Hidden in the parameter visibility tab.
2. Specify the default value of the parameter to True.
3. Click the series in the chart and select “Action” in the Properties pane and click the ellipsis as follows:
4. Select the “Go to report” tab, and select the self-report in the “Specify a report” tab.
5. Pass the parameter as bellows:
Name:Control Vaule:false
6. Right click the table control, select Tablix Properties and select the Visiblity property.
7. Select the tab of Show or hide based on an expression, and add the expression below:
=iif(Parameters!Control.Value=true,true,false)
If you need more assistance, please feel free to let me know.
Regards,
Heidi Duan -
How to display a table control in a report
hi
how to display a table control in a reportcreate a screen in your report.
Call that screen in your report.
While designing your screen, use Table control creation wizard to create table control on that screen.
http://www.planetsap.com/online_pgm_main_page.htm -
Error when displaying the table
hellow,
here i have to .htm pages, in first page i am entering the table name, and it has to display the table details in second page.
but in second page i am getting error like field catalog not found
plz help me.
with regards
babuhi babu rs
Please post the code of the two bsp page with the layout as well as abap code. Only than anybody can help you. -
Error message: when downloading data from 2nd display tag table
I am using disaply tag to display data in jsp page. I am using three different section to display the data with three display tag table. The data is displaying correctlly. The display tag downlod excel sheet is working for first display tag table. When i am trying to download data from 2nd and 3rd display tag table i am getting following error:
Exception: [.TableTag] Unable to reset response before returning exported data. You are not using an export filter. Be sure that no other jsp tags are used before display:table or refer to the displaytag documentation on how to configure the export filter (requires j2ee 1.3).
at org.displaytag.tags.TableTag.writeExport(TableTag.java:1438)
at org.displaytag.tags.TableTag.doExport(TableTag.java:1364)
at org.displaytag.tags.TableTag.doEndTag(TableTag.java:1215)
at org.apache.jsp.InstalBase_005fReport_jsp._jspService(InstalBase_005fReport_jsp.java:974)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)
As per the Exception i don't have any jsp tag before the display tag.
Please help me if any body has any solution for the above exception.
Thanks in advance.
Smruti..See also http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html
-
How to display a table data on Screen having a Table control
Hi ,
I am new to ABAP.I would like to display a table data (Eg: ZDemo) on a screen at run time.I have defined a Table control in screen. Now I want to populate data from ZDemo to table control.How can I do that?Please help moving forward in this regard.Hi Gayatri,
After creating table control do the following steps.
1. In the flow logic section write the following code:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
LOOP AT I_LIKP WITH CONTROL LIKP_DATA CURSOR LIKP_DATA-CURRENT_LINE.
MODULE ASSIGN_DATA.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0200.
LOOP AT I_LIKP.
ENDLOOP.
I_LIKP is the internal table which is used to display table data in the table control.
2. In Process Before Output, in the module STATUS_0200 write the following code:
DESCRIBE TABLE I_LIKP LINES FILL.
LIKP_DATA-LINES = FILL.
In Process After Input, in the module USER_COMMAND_0200 write the following code:
CASE SY-UCOMM.
WHEN 'LIPS'.
READ TABLE I_LIKP WITH KEY MARK = 'X'.
SELECT VBELN
POSNR
WERKS
LGORT
FROM LIPS
INTO TABLE I_LIPS
WHERE VBELN = I_LIKP-VBELN.
IF SY-SUBRC = 0.
CALL SCREEN 200.
ENDIF.
WHEN 'BACK'.
SET SCREEN 200.
ENDCASE.
In Process Before Output and in the module ASSIGN_DATA which is there inside the loop write the following code:
MOVE-CORRESPONDING I_LIKP TO LIKP.
So, Totally your flow logic code should be like this.
TABLES: LIKP, LIPS.
DATA: BEGIN OF I_LIKP OCCURS 0,
VBELN LIKE LIKP-VBELN,
ERNAM LIKE LIKP-ERNAM,
ERZET LIKE LIKP-ERZET,
ERDAT LIKE LIKP-ERDAT,
MARK TYPE C VALUE 'X',
END OF I_LIKP,
BEGIN OF I_LIPS OCCURS 0,
VBELN LIKE LIPS-VBELN,
POSNR LIKE LIPS-POSNR,
WERKS LIKE LIPS-WERKS,
LGORT LIKE LIPS-LGORT,
END OF I_LIPS,
FILL TYPE I.
CONTROLS: LIKP_DATA TYPE TABLEVIEW USING SCREEN 200,
LIPS_DATA TYPE TABLEVIEW USING SCREEN 300.
DATA: COLS LIKE LINE OF LIKP_DATA-COLS.
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'LIKP'.
SELECT VBELN
ERNAM
ERZET
ERDAT
FROM LIKP
INTO TABLE I_LIKP
WHERE VBELN = LIKP-VBELN.
IF I_LIKP[] IS INITIAL.
CALL SCREEN 200.
ENDIF.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module assign_data OUTPUT
text
MODULE ASSIGN_DATA OUTPUT.
MOVE-CORRESPONDING I_LIKP TO LIKP.
ENDMODULE. " assign_data OUTPUT
*& Module STATUS_0200 OUTPUT
text
MODULE STATUS_0200 OUTPUT.
DESCRIBE TABLE I_LIKP LINES FILL.
LIKP_DATA-LINES = FILL.
ENDMODULE. " STATUS_0200 OUTPUT
*& Module USER_COMMAND_0200 INPUT
text
MODULE USER_COMMAND_0200 INPUT.
CASE SY-UCOMM.
WHEN 'LIPS'.
READ TABLE I_LIKP WITH KEY MARK = 'X'.
SELECT VBELN
POSNR
WERKS
LGORT
FROM LIPS
INTO TABLE I_LIPS
WHERE VBELN = I_LIKP-VBELN.
IF SY-SUBRC = 0.
CALL SCREEN 200.
ENDIF.
WHEN 'BACK'.
SET SCREEN 200.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
Save and Activate the program along with the screen in which you have included table control.
Hope this will help you.
Regards
Haritha. -
What is the right way to display a table in Java web dynpro using a node.
Hi experts,
I am trying to show a node of cardinality 0...n as a table in an adobe form in Java web dynpro. But its not showing it properly. Can anybody please tell me what is the right way to display a table on adobe form using a node of cardinality 0...n or 1...n in Java Webdynpro. In ABAP webdynpro, we can drag and drop a node of cardianlity 0...n or 1...n to show as a table and it works fine. Is the same possible in Java webdynpro also. Please help.
Thanks and Regards.
Vaibhav Tiwari.Please refer to my post.. you will get the answer
Dynamic Table - same data repeating in all rows
Special care should be taken in designing the context for table attribute.
The attribute type singletone also plays a important role. I have this doubt from the beginning when you have reported this problem for the first time but finally you marked it as solved so i thought there might be some other issues but again when you reported that again i did some analysis.
Now coming to final solution :
For designing a table in adobe interactive form you have consider following
You have to design the view context upto three level, I am explaining you the properties
PDFDataSource (Parent Level1) - Cardinality 1:1 - Signetone -True - This is assigned to datasource
TableList (Parent Level2) - Cardinality (1:1) - Signetone -True
TableWrapper(Parent Level3) - Cardinality (0:n) - Signetone -True
TableData (Parent Level4) - Cardinality (0:1) - Signetone - false (This is the main point)
Then under TableData value node, you have to put all your table attributes.
This Value Node name can be anything but hierarchy should be same as I have mentioned above.
Please try out these steps and get back to me if you have any doubt. -
I need a Front LCD Display Screen Touch Digitizer Assembly Frame for Iphone 4S Black, where can i buy it ? can i it by website? what ? thanks
Anywhere you can find it via the obvious Google search. It won't be from Apple, but will be a generic replacement.
Why are you throwing away any future chances of out of warranty replacements when you drop or drown it? Apple will give you a warranteed replacement phone for $199 (in the US, roughly the same in your country) -
Regarding pop up menu on the right click of a row of a table in a frame
hi to all,
i am a naive in applet and swing.
i have some proplem regarding table in a frame.
actually i want to open a pop up menu on the right click of a row of a table in the frame.please send the code regarding this.Hi,
You're probably better off directing this to the swing forum but a starter for ten is the use of the MouseListener interface and the boolean isRightMouseButton method.
http://java.sun.com/docs/books/tutorial/uiswing/events/mouselistener.html
Regards,
Chris -
Accessibility: Reading order of tables and anchored frames
I am creating accessible, tagged (section 508 compliant) PDFs in FrameMaker 9. The reading order for tables and frames is not correct.
When I view the PDF reading order using Adobe Acrobat Professional or another screen reader, anchored items such as tables and anchored frames are placed last in the reading order, regardless of where they appear in the document flow or page layout. The reading order skips over all tables and frames, reading all paragraphs on a page first, then reading the tables and frames as the last objects on the page. This logically doesn't make sense to skip over tables/frames as they generally apply to the content that preceeds it.
For example, the following document structure:
<Paragraph 1>
<Table 1>
<Paragraph 2>
<Anchored Frame 1>
<Paragraph 3>
<Anchor Frame 2>
<Paragraph 4>
is being read by assistive technology as:
<Paragraph 1>
<Paragraph 2>
<Paragraph 3>
<Paragraph 4>
<Table 1>
<Anchored Frame 1>
<Anchor Frame 2>
I want the document structure to be read correctly as intended.
In otherwords, the PDFs generated by FrameMaker 9 are not completely accessible because of incorrect reading order output by default. This information is not listed in the VPAT for FrameMaker 9.
I want to avoid any post processing using Acrobat's Touch Up Reading Order tool. Is there a way to automate updates to reading order?
Can FrameMaker 9 logically place tables and anchored frames into the correct reading order? How do I adjust these settings?
Thanks in advance!As mentioned above, tables and anchored frames are inserted into thier own paragraph style "Frame". The paragraph style "Frame" is tagged. To my knowledge, there are no options for tagging or not tagging tables or anchored frames.
Regardless of which paragraph type the table or anchor frame is inserted into, and what that paragraphs tagging settings are, it is still last in the reading order.
I've tried a variety of options: tagging the "Frame" paragraph style as a sibling, child, and parent of my other paragraphs; I've even tried omitting it from the reading order. None of these options present anchored frames (and tables) in the logical reading order.
Even images that are inline (within a paragraph; not in thier own paragraph) are not being read as part of the paragraph. Inline images get skipped over by screen readers and get read at the end of the page, which makes no sense whatsoever.
All tables and images end up at the end of the reading order (after ALL paragraphs) regardless of the tagging settings.
Refer to my previous screenshot for a clear diagram of what is happening to the reading order. Each of those anchors is in it's own paragraph style. I want tables and anchored frames to be sequential in the reading order along with paragraphs. (1,2,3,4,5,6 not 1,4,2,5,3,6.)
I'm using the Tags tab of the "PDF Setup" dialog to adjust these settings. Is there somewhere else I should be making changes to the reading order?
This is a bit disturbing because FrameMaker touts creating accessible documents and this severe reading order issue impares my ability to do so. I would not consider documents that jump around the page in an illlogical, fixed order, to be accessible. I'm very suprised that no one else has encountered this issue (at least that I can find...) -
Need to display Internal table records on screen without using table contro
Hi Experts,
I have a requirement to display internal table on screen which is having three columns (Material no, Serial No and quantity).
But I can't use table control as it is not supported by hand held devices.
They are going to use this transaction on hand held devices.
Thanks In advance.
GauravYou should be able to use the good old STEP LOOP processing for this... create your three fields in the row then convert them to a STEP-LOOP.
You can look up in the help how to work with STEP-LOOPs if you are not familiar with it. It was the way to manage table-like information before the age of table controls -
How to display all tables residing in my database
i'm using 10g express edition.
i'm developing a .net application using oracle
i want display table infomation in a datagrid
for that i need to select tables fromthe database using the interface given by them
in that i found server name field.....what it actually means?
also how to create a new database in 10g and how to display all tables residing in the database?
pls help me
thanking u
chaitanyauser11359516 wrote:
i want display table infomation in a datagrid
select owner||'.'||table_name owner_table_name
from all_tables
user11359516 wrote:in that i found server name field.....what it actually means?i'm not sute what you mean by server name field? if you refer to table column name see this code below:
select owner||'.'||table_name||'.'||column_name table_column_name,
decode(data_type,'VARCHAR',data_type||'('||to_char(data_length)||')',
'VARCHAR2',data_type||'('||to_char(data_length)||')',
'NUMBER',decode(data_scale,0,data_type||'('||to_char(data_precision)||')',
null,data_type,
data_type||'('||to_char(data_precision)||','||to_char(data_scale)||')'),
data_type) type,
nullable
from all_tab_cols
order by table_name, column_id -
Displaying images in an application frame
I'm trying to display a .gif in a frame. The first challenge is to turn the file(local) into an Image class. I don't know how to do that. Second is taking that Image and using Graphics to draw it. Alas, made necessary are "ImageObserver", "ImagerConsumer", "ImageProducer" and other such nonsensical classes. I've spent quite some time trying to figure this out
I feel bad wasting a post on something like this, but it seems to me like a valid question. It even says in the O'Reilly's Java in a Nutshell that images in Java are confusing. If there are links to good tutorials, or someone could post code for a simple Frame with a Graphics object that displays a .gif image from the same directory as the class I would appreciate it greatly.I'm not sure why "Java in a nutshell" would say it's complex or confusing. But then that's the only O'Reilly book I've bought and didn't like. I prefer Bruce Eckel's "Thinking In Java"
In any case, let's look at images:
First, reference the "How to use Images" sectin of the Java Tutorial at http://java.sun.com/docs/books/tutorial/uiswing/misc/icon.html
The way I'd do it is to construct an ImageIcon class using
public ImageIcon(String filename)
Now, ImageIcon and Image are not derived from Component, so you can't put them into a Frame. BUT, you can put a JLable into a JFrame and the JLable can have an image. So you construct a new JLable like this:
ImageIcon myIcon = new ImageIcon("/images/duke.gif")
JLabel myLabel = new JLabel(myIcon);
Then put myLabel into your JFrame
myJFrame.getContentPane().add(myLabel);
(or put it in whatever layout manager and panel you are using within yoru JFrame)
That should do it. If you're going to be putting your code into a jar file then there is an additional bit of code that needs to be added. If you search for "Images jar" you'll find lots of discussion. Or you could go to my site at www.brouelette.com and look at the code for "One Hour Wumpus" to see the ImageLoader that I use that works in or out of a jar file.
Good luck.
Maybe you are looking for
-
How can i force my E70 to use voise dialing !!!
actualy just got this phone.. perfect staff, but... voice dialing dosent work at all !!!. I have broused a lot of discussions and forums but didnt find DIRECT answer. So, first: is i dont see any Option->Playback in the menu in the contact cards.. no
-
Can't create a new illustration. Problems occurred while saving the print file.
I can't open a new Illustrator file. It sends me this error: Can't create a new illustration. Problems occurred while saving the print file. ID:-1 I opened a previous document created in CC, but it will not allow me to copy and paste items from one d
-
Create Report from HFM Data Grid
Hi All, I need to create a report out of the Data Grid created in HFM and then publish that as a PDF. I found the Reporting feature in Manage Documents that uses system reports. And if I want a report from a data grid the Data Explorer option has to
-
I installed Nik:s suite of plug-ins for LR5 but for some reason not all of them were installed. In the end I uninstalled all of the Nik programs from my Mac but before I reinstalled them I opened LR5 again to check. Under "photo" and "edit in" the pl
-
Preview as default PDF reader in Safari
I've posted to this question, but since my problem seems to be unique - thought it might deserve to be a new topic. I Have the Adobe/Acrobat-caused problem that caused Safari to quit using Preview to read PDF files. What seems to be unique though, is