Can I sort by clicking on column headings in Lion?

I get search results, and I used to be able to click on the column headings and sort ascending/descending. Do I have to choose from the sort menu? And how do I reverse the sort?

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
public class Example {
    public static void main(String[] args) {
        final JTable table = new JTable(10,6);
        JTableHeader header = table.getTableHeader();
        header.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent evt) {
                Point pt = evt.getPoint();
                int colIdx = table.columnAtPoint(pt);
                int modIdx = table.convertColumnIndexToModel(colIdx);
                //for example:
                System.out.println(table.getModel().getColumnName(modIdx));
        JFrame f = new JFrame("Example");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(new JScrollPane(table));
        f.pack();
        f.setLocationRelativeTo(null);
        f.setVisible(true);
}

Similar Messages

  • Row and column headings

    How can I keep my row and column headings fixed on the screen while I scroll through the rest of a large spreadsheet?

    Choose Freeze Header Rows in the Table Format pane.
    Jerry

  • Sorting on DFF based columns

    Hi,
    I have a table region and few columns are based on DFF Segments. For eg., i have segments A, B & C defined for a DFF. These segments(A, B & C) are displayed a individual columns in a table region. But the sort option is not enabled. So i tried using the following code in processRequest,
    OADescriptiveFlexBean dff = (OADescriptiveFlexBean)webBean.findChildRecursive("CpiFlex");
    if (dff != null)
    dff.setSortable(true);
    The above code gets executed but the sorting option is not enabled.
    Is there any way i can enable sort option for the columns?
    Thanks, Suresh.

    Have you enabled the sorting property in the table column?
    --Shiv                                                                                                                                                                                           

  • Can't sort song titles by clicking on title field column in MediaSource or Nomad explo

    I am currently using Creative MediaSource application ver 2.02.06 for my Nomad Jukebox Zen Extra model DAP-HD00, 40 Gig. I currently upgraded to latest Nomad Explorer version 3.0.0 from prior version 3.00.8 and upgraded my driver from Ver .23.0 to Ver .30.03 both the latest for this player.
    I am working from an Win XP SP2, Pent 4, 3 Ghz CPU, Gig RAM memory environment.
    Has anyone of you run into this same/similar problem?
    With my curremt version of "Creative MediaSource" S/W, clicking on the Title, artist column headingss or any other column does not sort alphabetically as should be the case particularly my titles when I am in the Nomad Jukebox Zen Xtra "organizer" view. Nothing happens when I click on these column headings. Is this a Creative MediaSource application problem that can be fixed with upgrading to a higher version of S/W?
    I am debating whether the latest upgrade to "Creative MediaSource" ver 2.03.29 is merited for the following reasons:
    Its a huge download (Don?t have DSL because typically I don?t have needs to download anything that huge)</LI>
    I already updated to the latest driver Ver .30.03 and the latest firmware Ver .20.08 and latest Nomad explorer Ver 3.0.0.</LI>
    I noticed that the alphabetical sorting of titles did not work when I title clicked within the latest upgraded Nomad Explorer application which gives me little confidence that upgrading to the Creative MedoaSource application (Ver 2.03.29) will do anything for this problem.
    Can anybody out there provide me with any helpful comments?
    Thanks ahead of time to all.

    Noticed the same thing. Kinda annoying, yeah.

  • Can clicking on column heading sort the column contents instead of drill in

    I have a pivot table with data that the client doesn't want to drill into. Instead, they want to be able to click the column heading and have the pivot table re-sort the data in the table based on the data in that column. Is that possible, or are clickable column headings only used for drilling in OBIEE? Thanks.

    Madan -
    That seems like a feature that should be added to the Pivot Table view if they are going to have it in the Table View. Still, thanks for pointing out the "Enable column sorting in Dashboards" check box in the Table view. I'll see if I can either get this data into the Table view, or at least let the client know the limitations of OBIEE.
    Thanks again.
    Daniel

  • Sorting the report by clicking the column header

    Hello,
    Currently working on a requirement where i need to sort the report by clicking the column header. Can anyone please help me on this.
    Suppose i have 3 colums deptno,dname,sal fields in my report. if i click deptno column header,  report has to sort by deptno.Like that i need for other columns also.
    Any help is really appreciated
    Thanks
    Ram

    Hello,
    You can sort the fields using method suggested by Cauvery. However if you would like to have Ascending/ Descending sort order control at column header, then would require to implement few additional steps.
    First do the sorting of field using the way suggested by Cauvery. Once sorting is done, right  click on the column name and  select the option ' Bind Sort Control'. You will see the sorted field in the window. select the field and click ok.
    Now you would get 2 arrows on column. If you click upper arrow, fields would be sorted in Ascending Order and if you click on down arrow, it would  be in Descending order.
    Regards,
    Chinmay Athavale

  • How can I sort a table using more than one column in Numbers or in Pages?

    How can I sort a table using more than one column in Numbers or in Pages?

    Hi Ron,
    On the right side of the Toolbar click the Sort and Filter button, then select Sort.
    You can then set up a multiple column sort.
    Click Add A Column, Specify the sort for that column, Repeat.
    Jerry

  • Sort-on-clicked-column in BC4J

    Is there an easy way to create a sort-on-clicked-column in BC4J?
    I was thinking about creating hyperlinks on the column headers with a URL-parameter added (for example param.name 'p_order_by'). Then this parameter could have values like 1,2,3 etc (=clicked column nr)
    In the JSP I can read this parameter by means of:
    <% if (request.getParameter(p_order_by) != null) {
    String orderby = request.getParameter(p_order_by);
    } else {
    String orderby = "1";
    %>
    and alter my DataSource: orderbyclause="<%= orderby %>"
    I assume this can work (I will test :), but I can imagine there is a more easy way to do this....
    Thanks,
    regards
    Stephan

    There is definitely an easier way in later JDeveloper releases, but using the <jbo:* > tag library the way involves either using the orderbyclause property of the <jbo:DataSource> tag, or programmatically invoking a method in your ViewObject or ApplicationModule's public service interface that internally accomplishing the same thing which is to invoke the setOrderByClause() API on the view object in question.

  • How can I sort alphabetically three columns?

    Hi to everybody!
    I've got some problems sorting alphabetically three columns. If I try to sort one column it changes also the others. I want three independent columns and each of them must be sorted out alphabetically.
    In Excel it's so easy: I just have to select the column and push the button "sort the column alphabetically". Why is that so difficult in numbers?
    Check it out: http://yfrog.com/j6screenshot01tj

    l,
    What is the nature of the content in the three columns? If the content is just data, and not calculations or the input to calculations, you can easily accomplish a single column sort in Numbers.
    I see from your screen shot that you are still in the Excel mindset. You have a large table with more rows and columns empty than occupied. To work most effectively in Numbers we usually use only as many rows and columns as necessary, and if we have data that is of another set and not related, we begin a new table.
    So, if your data meets the requirements of the first paragraph and you have trimmed away the excess rows and columns we can do the following: Click once on the label of the column you wish to independently sort. Then click again on this label and drag it up and away from the table to a blank area of the canvas. Perform the sort on the separated column. Then grab the sorted column in the same way as before and move it over the original table, watching the borders between columns highlight as you move over them. The double line between columns identifies the insertion point. When you have your sorted column in the right place, drop it back into the original table.
    Jerry

  • Sort by clicking on the column heade with LIFO

    Good morning!
    I would like to sort by last entry is first (LIFO) in my report.
    To do that, I have to un check in sort:
    Home>Application Builder>Application ***>Page 1>Report Attributes*(Otherwise APEX shows: "Your query can't include an "ORDER BY" clause when having column heading sorting enabled.")*
    When I follow the APEX suggestion, my report lost feature to sort by clicking on the column header.
    I still want to keep sorting ability on any column just by clicking on the column header.
    Thanks in advance,
    Sam

    Sam,
    First remove the order by clause from your query and then try to set the sorting using the sort sequence. Thanks.
    Regards,
    --Manish                                                                                                                                                                                                                                                                                               

  • I can't sort a single column only (ignoring the next column)

    I can't sort a single column only (ignoring the next column) in NUMBERS

    Numbers sorting follows a database model in which each row is a 'record' rather than a collection of unrelated data items. When a table is sorted, the integrity of the individual records (rows) is maintained.
    If you need to sort a single column, that column (or its data) must be separated from the rest of the table.
    That can be done using copy/paste (as described above by Wayne), or by taking the column to be sorted out of the table, dropping it on the sheet to form a new, single column table, doing the sort, then returning the column to the original table.
    The 3 1/2 step process takes longer to describe than to do.
    Regards,
    Barry

  • Pages:  How can I sort one column of words and not have it affect the other columns?

    How can I sort one column of words and not have it affect the other columns?  I have opened the inspector to the edit columns and rows under Table.  It will sort the column, but then it changes the other colums as well.  I know that if I use Numbers, it will work, but I want to know how to do the same thing in Pages.

    Hi Peter,
    Numbers sorts full rows on values in selected column(s). The technique for sorting a single column is essentially the same as Jerry is describing for Pages tables—separate the (data in the) column to be sorted, sort it, return it to the table.
    In Numbers the actual column may be separated from the original table, sorted, then returned. In Pages, the data must be extracted, sorted, then pasted back in, overwriting the unsorted data (if it was left in the original table).
    iWork tables follow a database model in which each row is a Record, and each column holds a Field within the records.
    As evidenced by the current question (and several similar questions arising in the Numbers community) that model doesn't apply to the way some users, especially some who come in from the MS Excel world, use tables.
    With Excels model—islands of data on a single large table, the ability to sort one or a selected few columns of data makes sense. One 'island' may comprise only cells AA21:AH50. Sorting that small 'table' should be possible without disturbing the rest of rows 21-30, which are probably part of one or more other 'data islands' in the sea that is a MS Excel spreadsheet.
    In Numbers, each of those 'islands' would be a separate Table, and that Table would be sortable without disturbing other Tables in the document.
    Regards,
    Barry

  • Cannot auto size columns in iTunes 10.4.  Columns are all mixed up with headings I have never seen. Cannot change by right clicking on columns.

    Cannot auto size columns in iTunes 10.4.  Columns are all mixed up with headings I have never seen. Cannot change by right clicking on columns. Cannot order albums alphabetically by double clicking on heading.

    Very many thanks to you, Putaro!  Your answer provided the solution. It was a buggy plug-in that turned out to be the culprit.
    You're off the hook, Apple, and my apologies for stating that you let a dog run loose. You skated by this time, Apple. But I'm watching you.
    But again, Putaro's reference to the plugins I had installed over the years turned out to illuminate the problem. I have several plugins in my iTunes plugins folder, pretty much all designed to add more visualizer functionality. I removed all of them, and ALL of the problems I noted in my post went away, with full iTunes functionality restored.
    I began adding the plugins back to hopefully single out the culprit. Among the ones I had been using included fielder, G-Force, Timestrech, volcanokit, QuartzComposer, and Jax. I hadn't used any of them in a while - probably at least a verison or more back in iTunes updates, but iTunes continued to work with all of them installed. Currently, only QuartzComposer continues to work in iTunes 10.4. The rest no longer even show up as visualizer opitons, with one exception. Jax does show up, but does not work. AND THE PRESENCE OF JAX IS WHAT KILLED MY ITUNES.
    I looked into it and went back to the developer, and it appears that they discontinued developing Jax some time ago - evidently, it was buggy and crash prone. I remember after buying it, having problems with it - having never worked to its touted potential, but I didn't pursue it, and never uninstalled it. Leaving it in there caused all iTunes functionality to cease with the iTunes 10.4 update.
    If you've got Jax installed, consider removing it before updating to iTunes 10.4.
    My iTunes is now working right as rain, thanks again to Putaro!
    -Jon

  • Details: Numbers not translating an Excel document with column headings where the text is rotated counter clockwise 90 degrees with-in the cell.  Can you tell me how I can rotate the contents with-in a cell?

    Details: Numbers not translating an Excel document with column headings where the text is rotated counter clockwise 90 degrees with-in the cell.  Can you tell me how I can rotate the contents with-in a cell?

    Numbers does not have rotated text within cells.  You can place a text box over the cell that has rotated text but you cannot rotate text within a cell.

  • Indenting Column Headings for a Vertical Report - Carl, can you help pls.

    Hi,
    For a SQL Query region, under Report Attributes, is it possible to indent certain Column Headings somehow in order to achieve the following result:
    Test1 : A
    --------Sub Test1a : A1
    Test2 : B
    Test3 : C
    --------Sub Test3a : C1
    --------Sub Test3b : C2
    Test4 : D
    etc...
    So based on the above, I would like to be able to indent 'Sub Test1a', 'Sub Test3a' and 'Sub Test3b'. I have tried ' '  as well as <pre> Sub Test1a</pre> but unfortunately no go.
    Can anyone pls assist.
    Thanks.
    Tony.
    Message was edited by:
    tfatouro

    Try setting the column heading alignment to "Left" and then
    Test 1 : A&lt;BR/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Sub Test 1a : A1
    Message was edited by:
    amaline

Maybe you are looking for

  • Where is the microphone button in iMessage?

    I am trying to dictate text. Does the iPhone 4 have this option? I read the 5.0 update and it said tap the microphone button. Can't seem to find it. Thx for any help.

  • AirPlay iMac Yosemite Upgrade

    I upgraded my iMac (late 2009) in order to use AirPlay & view iMovie Projects through AppleTV. Once upgrade complete, still no AirPlay icon. Is there any way to use AirPlay from an older iMac?

  • How do I movie an iphoto album onto a memory card.

    I need step by step instructions on how to put an iphoto album or pic's from my library onto a memory card for a digital picture frame. Also how to make sure the pics are all the same size and will fit the full frame. I need this asap please, It's fo

  • Can i stop a timer in between

    hello, i have  a situatino where i have to monitor the time elapsed for an application but in one specific condition(say a switch toggle) i have to stop the timer and then resume the timing when the condition aborts. how do i achieve that?? awaiting

  • Better to resize JPEGs for a QT sequence before or while exporting from QT?

    I have several thousand JPEG files shot as a time-lapse sequence, at my DSLR camera's smallest size of 4288 by 2848 pixels. I want to sequence them as a QuickTime movie, for a final frame size of 1920 by 1080 pixels. Is it okay to batch resize the JP