.row and .col properties ?

Hi guys i have been doing flash programming since past 1 and half month but i never come across these .row and .col properties any where but i have seen few examples where people instatiate a moviclip object and using these two propeties .
like if i create a object using flash professional lets say a " Ball "
and in action script what we do normally to access that Ball from .FLA is
var temp:Ball = new Ball();
temp.row = 1;
temp.col= 2;
but it seems i was never able to find where these two propeties are could anyone please tell me where should i look for to access these two propeties thank you.

If the code you show is taken from something you actually have, then you can probably look in the Ball class file (or library object) and find the properties there.  If these objects are MovieClips, The MovieClip class does not include row and col properties.  So these properties are something someone assigned to the objects themselves.
One other thing, the MovieClip class is a dynamic class, so it is possible to have assigned these properties to the MovieClip object without having declared/defined them anywhere.

Similar Messages

  • Change row and col in excel

    Hi,i have labview 6  i need to get data to the excel specific row and col than on the same worksheet write another data and so on.
     in the word doc i put the code i use.
    1) how can i do it right
    2) how can i write to the same worksheet without run over the old data
    i have to do 100 experiment and i don't want to open 100 worksheets on the excel
    thanks in advance.
    Attachments:
    excel.doc ‏27 KB

    Hi,
           Should the excel need any style for it. example, characters' color, text size. text style, append picture etc.
    if not. you can use "write characters to file.vi" this vi is easy controlled that write to the same worksheet ,as your option, run over or not the old data.
    if you need some of excel's style. you can make the old data worksheet as a temp.xls. define the worksheet written position, thus, the data will not run over the old data.
    Try to make everything Automatic

  • Sap.table.table onAfterRendering event breaks the table rows and cols

    Hi guys,
    I am coloring all the rows, which don't have an entry.
    I do that by using the event onAfterRendering from the table control.
    The coloring is working fine, but the rows and cols get broken as u can see on the attached picture.
    By adding a new entry to the table, they get fixed.
    Any ideas how could i fix that?
    I appreciate any help.
    Regars,
    Georgi

    This is because you have overwritten the library code :-)
    please do this.
    <yourControl>.onAfterRendering = function() {
         sap.ui.table.Table.prototype.onAfterRendering.apply(this);
         <your code> ....
    -D

  • How to know the row and col numbers of a cell in JTable at mouseclicked

    Hi, I'm coding an app using swing and JTable, in this table I will display the records from a database, now, each time the user has click in any cell I want to display it value, whit this method:
        private void setpuntero(JTable table, int row, int col){
            Object o = table.getValueAt(row, col);
            System.out.println("Valor de la celda: "+o.toString());
    }The mouseclick event was coded like this:
                table.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
                        setpuntero(table, 1, 3);
                });My question is:
    how in the mouseClicked I can pass to setpuntero() method the dynamic values of the cell that the user clicked?
    In this example, setpuntero(table, 1, 3); I have chosen the cell(1,3) to display the value, but really I don't know how to capture those values dinamically using the mouse click
    Regards
    Herbert

    perhaps:
          public void mouseClicked(MouseEvent e)
            int row = table.getSelectedRow();
            int col = table.getSelectedColumn();
            String selected = table.getValueAt(row, col).toString(); // this will need to be changed if not String data
          }

  • Store BP and Item properties in Rows of new table in parallel to columns

    Hi Product Development Team,
    At present SAP B1 stores BP and Item properties as 64 columns in respective master table.
    As the main purpose of property feature is for Reporting and Analysis, Analysis Report developers faces difficulties in preparing analysis report based on properties in the present structure of prperties in column.
    I suggest to introduce additional new table (each for Business Partners and Items properties) which contain rows for selected BPs/item's selected properties.
    In order to retain present functionality the existing column can remain as it is and also continue to updated as it is.Only additional new table will also get updated and new analysis reports can be build using these newly suggested tables.
    Best Regards,
    Samir Gandhi

    No Body responded very strange !!!!!

  • Map CdC op transform SEQUENCE and ROW oper column properties

    I am using Map_cdc_op transform, for sequence column and row operation column properties, what fields should i choose?
    My source table has the following columns:
    RMID - primary key int
    RMName - varchar
    created_date datetime
    Last_updated datetime
    target table also has above 4 columns plus one rmLogID column with int data type. which is key column in target.
    does map_cdc_op transform also take care of the surrogate key column id in target? which is "rmlogid".
    thank you very much for the helpful info.

    Suneer I am using SQL serverdatabase, this table is dragged to workspace as source:
    RMID - primary key int
    RMName - varchar
    created_date datetime
    Last_updated datetime
    My task is to capture data changes from this table to target table, for that i a using Map_op_CDC transform, now under the properties SEQUENCE and ROW oper column what fields should i pic.I never used this transform before.
    RMid is the primary key in source, rest teh of teh fields are changeable. i track created_dt and last_updated dates for that row.
    Thanks a lot for the helpful info.

  • Multiple rows and multiple cols inone report

    Hi
    All
    I have a req where i need to build a report with multiple rows and multiple columns
    .... .......................  2009 jan ,        2009 feb ,      2009 march ,   2009 april...........................
    ............................ dim3 mem1 ,    dim3 mem1 ,  dim3 mem1,     dim3 mem1..........................
    dim1 mem1
    dim2 mem1
    calc value
    dim1 mem2
    dim2 mem1
    calc value
    dim1 mem3
    dim2 mem1
    calc value
    please advice if i can use the colkey range and rowkeyranges for this type of expansion and how?
    thanks
    Edited by: bpc_now on Oct 21, 2010 6:40 AM

    Hi,
    If you need multiple dimensions, then the first thing is to specify EVDRE("mXn")
    where m = number of dimensions in column
    n = number of dimensions in the row.
    If the EVDRE has already been built and you wnat to change it, then you need to change the rowkeyrange and colkeyrange. And accordingly, you should have 4 expansions - 2 for rows and 2 for columns.
    Hope it helps.

  • Getting ParserException: / expected(:main:, row:1, col:101)

    Hi Experts,
    I am using a java code for schema validation of input XI message.
    Java code:
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import com.sap.aii.mapping.api.StreamTransformation;
    import java.io.*;
    import java.util.Map;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    public class P2PValidation extends DefaultHandler implements StreamTransformation{
         private Map map;
         private OutputStream out;
         //Constants when using XML Schema for SAX parsing.
         static final String JAXP_SCHEMA_LANGUAGE =
         "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
         static final String W3C_XML_SCHEMA =
         "http://www.w3.org/2001/XMLSchema";
         static final String JAXP_SCHEMA_SOURCE =
         "http://java.sun.com/xml/jaxp/properties/schemaSource";
         public void setParameter (Map param){
              map = param;
         public void execute (InputStream in, OutputStream out)
         throws com.sap.aii.mapping.api.StreamTransformationException {
            DefaultHandler handler = this;
              SAXParserFactory factory = SAXParserFactory.newInstance();
              //Obtain an object of class javax.xml.parsers.SAXParser,
             factory.setNamespaceAware(true);
             factory.setValidating(true);
              try {
                   SAXParser saxParser = factory.newSAXParser();
                   // Setup the schema file
                   saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                   saxParser.setProperty(JAXP_SCHEMA_SOURCE, new File("IOReqMsgSchema.xsd"));
                  //System.out.println("Parsing");
                  this.out = out;
                   saxParser.parse(in, handler);
              catch (Exception t){
                   t.printStackTrace();
         private void write (String s) throws SAXException{
              try{
                   out.write(s.getBytes()); out.flush();
              catch (IOException e){
                   throw new SAXException("I/O error", e);
         public void startDocument () throws SAXException{
              write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
              write("<ns0:ValidInternalOrder xmlns:ns0=\"http://www.xyz.com/Gopal\">");
         public void endDocument () throws SAXException {
              write("</ns0:ValidInternalOrder>");
              try { out.flush();
              catch (IOException e) {
                   throw new SAXException("I/O error", e);
         public void startElement (String namespaceURI, String sName, String qName, Attributes attrs)
         throws SAXException {
            System.out.println("sName="sName" qName="+sName);
                if(sName.equals(qName))
                   write("<"sName">");
         public void endElement (String namespaceURI, String sName, String qName) throws SAXException {
              if(sName.equals(qName))
                   write("</"sName">");
         public void characters (char buf[], int offset, int len)
         throws SAXException {
              String s = new String(buf, offset, len);
              write (s);
         public void error(SAXParseException se) throws SAXException {
              throw se;
    Input XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:InternalOrder_request xmlns:ns0="http://www.xyz.com/Gopal">
       <ORDER>TEST101</ORDER>
       <ORDER_TYPE>XYZ</ORDER_TYPE>
       <ORDER_NAME>TEST</ORDER_NAME>
       <CO_AREA>ABC</CO_AREA>
       <CCTR_POSTED>56345</CCTR_POSTED>
       <CURRENCY>INR</CURRENCY>
       <PERSON_RESP>SAMUAL</PERSON_RESP>
    </ns0:InternalOrder_request>
    Input xsd:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.xyz.com/Gopal" targetNamespace="http://www.xyz.com/Gopal">
         <xsd:element name="InternalOrder_request" type="InternalOrder" />
         <xsd:complexType name="InternalOrder">
              <xsd:annotation>
                   <xsd:appinfo source="http://sap.com/xi/TextID">
                   96f86070e91411dc9c0d0012799ec115
                   </xsd:appinfo>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="ORDER">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             577ce800896811dca23200c045000001
                             </xsd:appinfo>
                             <xsd:documentation xml:lang="EN">
                             Order
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:minLength value="1" />
                                  <xsd:maxLength value="12" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="ORDER_TYPE" default="Z001">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             577ce801896811dcc66100c045000001
                             </xsd:appinfo>
                             <xsd:documentation xml:lang="EN">
                             Order type
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:minLength value="1" />
                                  <xsd:maxLength value="4" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="ORDER_NAME">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             577ce802896811dcbb3900c045000001
                             </xsd:appinfo>
                             <xsd:documentation xml:lang="EN">
                             Order short text
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:minLength value="0" />
                                  <xsd:maxLength value="40" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="CO_AREA">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             577ce803896811dcae0e00c045000001
                             </xsd:appinfo>
                             <xsd:documentation xml:lang="EN">
                             Control area
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:minLength value="1" />
                                  <xsd:maxLength value="4" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="CCTR_POSTED">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             577ce804896811dcb50900c045000001
                             </xsd:appinfo>
                             <xsd:documentation xml:lang="EN">
                             CC true post
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:minLength value="1" />
                                  <xsd:maxLength value="10" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="CURRENCY">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             577ce805896811dca87500c045000001
                             </xsd:appinfo>
                             <xsd:documentation xml:lang="EN">
                             Currency
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:minLength value="0" />
                                  <xsd:maxLength value="5" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="PERSON_RESP">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             577ce806896811dcaef000c045000001
                             </xsd:appinfo>
                             <xsd:documentation xml:lang="EN">
                             Person Rsep
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:minLength value="0" />
                                  <xsd:maxLength value="20" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>
    This java code works fine as a standalone code in my machine. I am using JDK1.4.2_13. I gave the input xml file same as that I got from message mapping under SRC tab.
    But when I use the same java program in my XI interface mapping I am getting the error:
    Fatal Error: com.sap.engine.lib.xml.parser.ParserException: </ expected(:main:, row:1, col:101)(:main:, row=1, col=101) -> com.sap.engine.lib.xml.parser.ParserException: </ expected(:main:, row:1, col:101) at com.sap.engine.lib.xml.parser.XMLParser.scanEndTag(XMLParser.java:1872) at com.sap.engine.lib.xml.parser.XMLParser.scanElement(XMLParser.java:1846) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2845) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:231) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:145) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:160) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:261) at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:280) at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:342) at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    Basically what I am doing in interface mapping is that I am first validating the input XI message using the schema. If the validation fails then throwing an exception, Else outputting the output xml in the output stream. The output is then mapped to target message using the graphical message mapping. The target message refers to the BAPI's output interface.
    So  what I doing wrong ? Why is the same java mapping code not working in XI? Is there some unicode problem in XI?
    Any parser problem? My XI server is also using JDK1.4.2_13
    One thing I have observed is that the code works in XI if I comment the following code lines
    factory.setNamespaceAware(true);
             factory.setValidating(true);
    saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                   saxParser.setProperty(JAXP_SCHEMA_SOURCE, new File("IOReqMsgSchema.xsd"));
    Please help me! I have been struggling with this since 3 weeks now.
    Thanks
    Gopal

    Hi,
    just comment
    factory.setNamespaceAware(true);
    and then try.
    I am using the DOM parser
    please refer:
    /people/ranjit.deshmukh/blog/2008/01/14/validations-using-java-for-those-not-having-pi71
    Ranjit

  • JTable fixed Row and Column in the same window

    Hi
    Could anyone tip me how to make fixed row and column in the same table(s).
    I know how to make column fixed and row, tried to combine them but it didnt look pretty.
    Can anyone give me a tip?
    Thanks! :)

    Got it to work!
    heres the kod.. nothing beautiful, didnt clean it up.
    * NewClass.java
    * Created on den 29 november 2007, 12:51
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package tablevectortest;
    * @author Sockan
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    public class FixedRowCol extends JFrame {
      Object[][] data;
      Object[] column;
      JTable fixedTable,table,fixedColTable,fixedTopmodelTable;
      private int FIXED_NUM = 16;
      public FixedRowCol() {
        super( "Fixed Row Example" );
        data =  new Object[][]{
            {      "","A","A","A","",""},
            {      "a","b","","","",""},
            {      "a","","c","","",""},
            {      "","","","d","",""},
            {      "","","","","e",""},
            {      "","","","","","f"},
            {      "","b","","","",""},
            {      "","","c","","",""},
            {      "","","","d","",""},
            {      "","","","","e",""},
            {      "","b","","","",""},
            {      "","","c","","",""},
            {      "","","","d","",""},
            {      "","","","","e",""},
            {      "","","","","","f"},
            {      "I","","W","G","A",""}};
        column = new Object[]{"A","B","C","D","E","F"};
        AbstractTableModel fixedColModel = new AbstractTableModel() {
          public int getColumnCount() {
            return 1;
          public int getRowCount() {
            return data.length;
          public String getColumnName(int col) {
            return (String) column[col];
          public Object getValueAt(int row, int col) {
            return data[row][col];
          public boolean CellEditable(int row, int col) {
            return true;
        AbstractTableModel    model = new AbstractTableModel() {
          public int getColumnCount() { return column.length-2; }
          public int getRowCount() { return data.length - FIXED_NUM; }
          public String getColumnName(int col) {
           return (String)column[col+1];
          public Object getValueAt(int row, int col) {
            return data[row][col+1];
          public void setValueAt(Object obj, int row, int col) {
            data[row][col+1] = obj;
          public boolean CellEditable(int row, int col) {
            return true;
        AbstractTableModel fixedTopModel = new AbstractTableModel() {
          public int getColumnCount() { return 1; }
          public int getRowCount() { return data.length - FIXED_NUM; }
          public String getColumnName(int col) {
           return (String)column[col];
          public Object getValueAt(int row, int col) {
            return data[row][col];
          public void setValueAt(Object obj, int row, int col) {
            data[row][col] = obj;
          public boolean CellEditable(int row, int col) {
            return true;
        AbstractTableModel fixedModel = new AbstractTableModel() {     
          public int getColumnCount() { return column.length-2; }
          public int getRowCount() { return FIXED_NUM; }
          public Object getValueAt(int row, int col) {
            return data[row + (data.length - FIXED_NUM)][col+1];
        table = new JTable( model );
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        fixedTable = new JTable( fixedModel );
        fixedTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        fixedTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        fixedColTable= new JTable(fixedColModel);
        fixedColTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        fixedColTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        fixedTopmodelTable = new JTable(fixedTopModel);
        fixedTopmodelTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        fixedTopmodelTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);   
        JScrollPane scroll      = new JScrollPane( table );
         scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
         scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        JScrollPane fixedScroll = new JScrollPane( fixedTable ) {
          public void setColumnHeaderView(Component view) {}
        fixedScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        fixedScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        JScrollBar bar = scroll.getVerticalScrollBar();
        JScrollBar dummyBar = new JScrollBar() {
          public void paint(Graphics g) {}
        dummyBar.setPreferredSize(bar.getPreferredSize());
        scroll.setVerticalScrollBar(dummyBar);
        final JScrollBar bar1 = scroll.getHorizontalScrollBar();
        JScrollBar bar2 = fixedScroll.getHorizontalScrollBar();
        bar2.addAdjustmentListener(new AdjustmentListener() {
          public void adjustmentValueChanged(AdjustmentEvent e) {
            bar1.setValue(e.getValue());
        JViewport viewport = new JViewport();
        viewport.setView(fixedColTable);
        viewport.setPreferredSize(fixedColTable.getPreferredSize());
        fixedScroll.setRowHeaderView(viewport);
        fixedScroll.setCorner(JScrollPane.UPPER_LEFT_CORNER, fixedColTable
            .getTableHeader());   
        JViewport viewport2 = new JViewport();
        viewport2.setView(fixedTopmodelTable);
        viewport2.setPreferredSize(fixedTopmodelTable.getPreferredSize());
        scroll.setRowHeaderView(viewport2);
        scroll.setCorner(JScrollPane.UPPER_LEFT_CORNER, fixedTopmodelTable
            .getTableHeader()); 
        scroll.setPreferredSize(new Dimension(600, 19));
        fixedScroll.setPreferredSize(new Dimension(600, 100)); 
        getContentPane().add(     scroll, BorderLayout.NORTH);
        getContentPane().add(fixedScroll, BorderLayout.CENTER);   
      public static void main(String[] args) {
        FixedRowCol frame = new FixedRowCol();
        frame.addWindowListener( new WindowAdapter() {
          public void windowClosing( WindowEvent e ) {
            System.exit(0);
        frame.pack();
        frame.setVisible(true);
    }

  • How to freeze row and column in JTable

    Hi,
    I need to freeze first two rows and columns in a large JTable. I found ways to freeze either a row or a column, but not both at the same time.
    Can any of you help ?
    Found this code which allows freezing a col. Similar method can be used to freeze column
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JViewport;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.JTableHeader;
    import javax.swing.table.TableModel;
    public class FrozenTablePane extends JScrollPane{
    public FrozenTablePane(JTable table, int colsToFreeze){
    super(table);
    TableModel model = table.getModel();
    //create a frozen model
    TableModel frozenModel = new DefaultTableModel(
    model.getRowCount(),
    colsToFreeze);
    //populate the frozen model
    for (int i = 0; i < model.getRowCount(); i++) {
    for (int j = 0; j < colsToFreeze; j++) {
    String value = (String) model.getValueAt(i, j);
    frozenModel.setValueAt(value, i, j);
    //create frozen table
    JTable frozenTable = new JTable(frozenModel);
    //remove the frozen columns from the original table
    for (int j = 0; j < colsToFreeze; j++) {
    table.removeColumn(table.getColumnModel().getColumn(0));
    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    //format the frozen table
    JTableHeader header = table.getTableHeader();
    frozenTable.setBackground(header.getBackground());
    frozenTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    frozenTable.setEnabled(false);
    //set frozen table as row header view
    JViewport viewport = new JViewport();
    viewport.setView(frozenTable);
    viewport.setPreferredSize(frozenTable.getPreferredSize());
    setRowHeaderView(viewport);
    setCorner(JScrollPane.UPPER_LEFT_CORNER, frozenTable.getTableHeader());
    }

    Hi,
    I need to freeze first two rows and columns in a large JTable. I found ways to freeze either a row or a column, but not both at the same time.
    Can any of you help ?
    Found this code which allows freezing a col. Similar method can be used to freeze column
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JViewport;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.JTableHeader;
    import javax.swing.table.TableModel;
    public class FrozenTablePane extends JScrollPane{
    public FrozenTablePane(JTable table, int colsToFreeze){
    super(table);
    TableModel model = table.getModel();
    //create a frozen model
    TableModel frozenModel = new DefaultTableModel(
    model.getRowCount(),
    colsToFreeze);
    //populate the frozen model
    for (int i = 0; i < model.getRowCount(); i++) {
    for (int j = 0; j < colsToFreeze; j++) {
    String value = (String) model.getValueAt(i, j);
    frozenModel.setValueAt(value, i, j);
    //create frozen table
    JTable frozenTable = new JTable(frozenModel);
    //remove the frozen columns from the original table
    for (int j = 0; j < colsToFreeze; j++) {
    table.removeColumn(table.getColumnModel().getColumn(0));
    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    //format the frozen table
    JTableHeader header = table.getTableHeader();
    frozenTable.setBackground(header.getBackground());
    frozenTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    frozenTable.setEnabled(false);
    //set frozen table as row header view
    JViewport viewport = new JViewport();
    viewport.setView(frozenTable);
    viewport.setPreferredSize(frozenTable.getPreferredSize());
    setRowHeaderView(viewport);
    setCorner(JScrollPane.UPPER_LEFT_CORNER, frozenTable.getTableHeader());
    }

  • Referring to Cursor Row and Column in Dynamic SQL

    I have a procedure that dynamically reads a schema name and table name from an input table. The code then needs to loop through all rows and columns of each table and output the data. I'm 95% done with what I want to accomplish, but there is one small bug. The line dbms_output.put(*col.column_name* || '',''); ' ||
    should refer to something like rec.col.column_name so that it gets the column of the current record. Right now it just displays the column name for each record instead of the actual value. Can anyone help me tweak the code to get the actual value?
    CREATE OR REPLACE PACKAGE BODY some_proc IS
    -- Function and procedure implementations
    PROCEDURE create_files IS
    CURSOR c_tbls IS
    SELECT * FROM tbl_list;
    l_sql VARCHAR2(4000);
    BEGIN
    --Loop through all tables
    FOR tbl IN c_tbls LOOP
    l_sql := 'DECLARE ' || ' CURSOR c_tbl_recs IS ' || ' SELECT * ' ||
    ' FROM ' || tbl.schema_name || '.' || tbl.table_name || '; ' ||
    ' t_tbl_rowtype c_tbl_recs%ROWTYPE; ' || 'BEGIN ' ||
    ' FOR rec IN c_tbl_recs LOOP ' ||
    ' FOR col IN (SELECT column_name ' ||
    ' FROM dba_tab_cols ' ||
    ' WHERE owner = ''' || tbl.schema_name || '''' ||
    ' AND table_name = ''' || tbl.table_name || '''' ||
    ' ORDER BY column_id) LOOP ' ||
    *' dbms_output.put(col.column_name || '',''); ' ||* ' END LOOP; dbms_output.put_line(''''); END LOOP; ' ||
    'END; ';
    --dbms_output.put_line(l_sql);
    EXECUTE IMMEDIATE l_sql;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(SQLERRM);
    END;
    END;

    Is it this what you are looking for?
    (it took some minutes)
    create or replace
    package some_proc is
    procedure create_files;
    end;
    CREATE OR REPLACE
    PACKAGE BODY some_proc
    IS
      -- Function and procedure implementations
    PROCEDURE create_files
    IS
      CURSOR c_tbls
      IS
        SELECT * FROM tbl_list;
      CURSOR c_cols (p_table_owner VARCHAR2, p_table_name VARCHAR2)
      IS
        SELECT column_name
        FROM all_tab_columns
        WHERE owner   =p_table_owner
        AND table_name=p_table_name
        ORDER BY all_tab_columns.column_id;
      l_sql     VARCHAR2(32000);
      separator VARCHAR2(1):=';';
    BEGIN
      --Loop through all tables
      FOR tbl IN c_tbls
      LOOP
        dbms_output.put_line('TABLE: '||tbl.schema_name||'.'||tbl.table_name);
        l_sql := 'DECLARE ' ;
        l_sql := l_sql|| '  CURSOR c_tbl_recs IS ' ;
        l_sql := l_sql||'    SELECT * FROM ' || tbl.schema_name || '.' || tbl.table_name || '; ' ;
        l_sql := l_sql||'    linenr number:=1; ';
        l_sql := l_sql||'BEGIN ' ;
        l_sql := l_sql|| ' FOR rec IN c_tbl_recs LOOP ';
        FOR c IN c_cols(tbl.schema_name,tbl.table_name)
        LOOP
          l_sql:=l_sql ||' if linenr=1 then  dbms_output.put('''||c.column_name||''||separator||'''); end if; ' ;
        END LOOP;
        l_sql :=l_sql||'  dbms_output.put_line(''''); linenr:=linenr+1; ';
        FOR c IN c_cols(tbl.schema_name,tbl.table_name)
        LOOP
          l_sql:=l_sql ||' dbms_output.put(rec.'||c.column_name||'||'''||separator||'''); ' ;
        END LOOP;
        l_sql:=l_sql||'  end loop; ';
        l_sql:=l_sql||'  dbms_output.put_line(''''); ';
        l_sql:=l_sql||'  dbms_output.put_line(''''); ';
        l_sql:=l_sql||'end;';
        EXECUTE IMMEDIATE l_sql;
      END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
      dbms_output.put_line(SQLERRM);
    END;
    END;
    /

  • Row and Column Insertion

    Hi Gurus,
    Hi to all im new here, and to sap bpc.
    i need some help regarding in evdre reporting..
    i already created an evdre report with single row and single col, now what i want is to allow user to choose and put another dimension in either row or column range..
    is it possible?
    if yes can u help me on this..
    thanks!
    kurt..

    Hi,
    You can add columns and rows to an existing Reprot by using "Edit report using drag & drop" functionality.
    Steps :-
    1.Open an existing Report.
    2.Select Edit report using drag & drop from the Report Tasks section of the action pane.
    3.Select Search from the Drag & Drop Options action pane.Double-click the sheet/address for the EVDRE report you want to modify, then click the ok button.
    4.To modify this report, select Start designing in the Drag & Drop Options action pane.
    5.From the Dimensions list in the EvDRE Design Options action pane, click any available dimension name and drag it to either column or row area.(Green area in the report)
    6. Click ok and Save the Report.
    Hope this helps.
    Regards,
    Ankita

  • Report Writer Row and Column Format

    Hi
    Was wondering if there is a possible solution to this :-
    Understand that column format is controlled by format groups. This means that all figures in the same column will take the same format (such as scaling and decimal place).
    Scenario is ->
                        Colunn #1 -> column set as displaying no decimal point       
    Rev                  120
    OP                      5
    OP margin %     4.2 -> how to set this to 1 decimal point. Any formula syntax that I can use?
    Regards.

    Hi Vinay,
    Based on my research, freezing row and column headers are different in table and matrix.
    In a table, if we want to freeze column header, we should make the changes in the first Static row group in Row Groups pane with Advanced Mode as you said. If we want to freeze row header, the table should have a group ahead, then we can enable “Repeat header
    rows on each page” and “Keep header visible while scrolling” options in Row Headers in Tablix Properties dialog box.
    In a matrix, if we want to freeze column header, we can enable “Repeat header columns on each page” and “Keep header visible while scrolling” options in Column Headers in Tablix Properties dialog box. If we want to freeze row header, we can enable “Repeat
    header rows on each page” and “Keep header visible while scrolling” options in Row Headers in Tablix Properties dialog box.
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Row and Column Template in Hyperion Reporting

    Hi
    Whenver I am trying to save a column of a report as a template , it is giving an error :
    "The selected columns contain one or more of the items below that cannot be included in templates:
    Invalid Input "
    I am not sure what does this mean. Though I have already deselected the "Link to Source Object". Can anyone suggest ?

    it may also worth cross checking below form doc:
    a.If your row and column template contains formulas with external references (for
    example, to cells outside of the selected row and column template), you are prompted
    to modify those formulas before saving the row or column template.
    Note: You can save a row and column template that contains cell formulas, as these can
    be discarded. For more information, see step 9.c on page 115.
    b. If a secondary database connection was specified within the row and column template,
    a dialog box displays prompting you to continue saving the template. If you save the
    template, the secondary database connection you specified in the row and column
    template is discarded. The primary database connection is then used for the row and
    column template.
    c. If unsupported properties are found, an Information dialog box presents a list of
    properties to discard before saving the template. For example, if the row and column
    template contains a cell formula, you can choose to save the template without the
    formula or not save the template.

  • Remove specific row and column from 2d array

    Hi,
    I would like to know how to remove the specific row and column from 2d array.
    for example, I have the original 4x4 array as below
    2 -1 -1 0
    -1 2 0 -1
    -1 -1 2 0
    -1 -1 -1 3
    let say that i want to remove row 2(bold) and column 2(bold), and the new 2d array should get as below
    2 -1 0
    -1 2 -1
    -1 -1 3
    Thanks.

    You can't remove elements of an array, it's fixed at a certain size once created. What you can do however is make a new array and only copy the things you want. Something like:public static void main(String[] args) {
        Integer[][] bar = new Integer[5][5];
        for (int i = 0; i < bar.length; i++) {
            Integer[] baz = bar;
    Arrays.fill(baz, i);
    System.out.println(Arrays.toString(baz));
    Integer[][] muu = new Integer[5][4];
    removeColumn(3, bar, muu);
    for (Integer[] mee : muu) {
    System.out.println(Arrays.toString(mee));
    Integer[][] smuu = new Integer[4][5];
    removeRow(3, bar, smuu);
    for (Integer[] mee : smuu) {
    System.out.println(Arrays.toString(mee));
    public static <T> void removeRow(int row, T[][] a, T[][] result) {
    if (row >= a.length) {
    throw new IllegalArgumentException("no row at " + row);
    for (int a_r = 0, result_r = 0; a_r < a.length; a_r++) {
    if (a_r == row) {
    continue;
    System.arraycopy(a[a_r], 0, result[result_r], 0, a[a_r].length);
    result_r++;
    public static <T> void removeColumn(int col, T[][] a, T[][] result) {
    for (int i = 0; i < a.length; i++) {
    if (col >= a[i].length) {
    throw new IllegalArgumentException("no column at [" + i + ", " + col + "]");
    for (int a_i = 0, r_i = 0; a_i < a[i].length; a_i++) {
    if (a_i == col) {
    continue;
    result[i][r_i] = a[i][a_i];
    r_i++;

Maybe you are looking for

  • Dana Nourie web application tutorials

    hi these are great tutorials and i've learned a lot from them - it brought so mcuh together in a clea dn easy to understand manner only problem after completing part 4 i can't compile my divelog.java file as its giving me the following error C:\divel

  • HELPED NEED! AV Cable * Universal Dock

    I purchased the universal dock and av cable hoping to play my music from my ipod on my stero system. The cable has a line that fits into the steroeo nicely but then it has three lines; one is yellow, one red, and the last one is white. I put them all

  • Bad performance dynamic page

    Hi. Can anybody tell what the bottleneck is in this script? It is a dynamic page (portal 3.0.9). The select statements are not very complicated. ANY HELP IS WELCOME!! <HTML> <BODY BGCOLOR="#FFFFFF" TEXT="#444444"> <ORACLE> declare cursor c_runway is

  • Mac Mini Upgrade to Lion with USB: can't download Server Add On

    I have a Mac Mini on Snow Leopard and I bought the Lion USB key to upgrade to Lion. I have a weak internet connection. Unfortunately, the first thing that happens when I insert the USB key and start the upgrade is that it needs to download the Server

  • Spry Widget Horizontal Menu IE Issue

    Hi, I am new to spry widgets. I am building this site in dreamweaver and am using the spry widgetfor my nav bar. The issue is, in Firefox the menu looks the way it is supposed to, but in IE it has a black box. I have tried a few things, but no luck.