The follow functions initiate the sorter just after initializing the compon

The follow functions initiate the sorter just after initializing the components in the file student.dialog
void mySettings()
//jTable1.rowSelectionAllowed();
jTable1.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
//jTable1.setFont(new Font("Helvetica", Font.PLAIN, 10));
jTable1.setModel(new StudentTableModel(jTable1,jLabel25));
// MyTableModel model = new MyTableModel(this.rw,this.cl);
sorter = new TableRowSorter(jTable1.getModel());
jTable1.setRowSorter(sorter);
//jTable1.getValueAt(rw, cl);
// System.out.println(jTable1.getColumnModel().getColumn(2));
jTable1.getSelectionModel().addListSelectionListener(
new ListSelectionListener() {
public void valueChanged(ListSelectionEvent event) {
int viewRow = jTable1.getSelectedRowCount();
//jLabel1.setText(String.valueOf(jTable1.getSelectedRowCount()));
if (viewRow < 0) {
//Selection got filtered away.
// statusText.setText("");
} else {
//int modelRow =
// jTable1.convertRowIndexToModel(viewRow);
firstName.getDocument().addDocumentListener(
new DocumentListener() {
@Override
public void changedUpdate(DocumentEvent e) {
newFilter();
@Override
public void insertUpdate(DocumentEvent e) {
newFilter();
@Override
public void removeUpdate(DocumentEvent e) {
newFilter();
lastName.getDocument().addDocumentListener(
new DocumentListener() {
@Override
public void changedUpdate(DocumentEvent e) {
newFilter();
@Override
public void insertUpdate(DocumentEvent e) {
newFilter();
@Override
public void removeUpdate(DocumentEvent e) {
newFilter();
}After this when a user select a filter and table get sorted only 10 records appear there int the jtable from which a user select just one and press the remove button on that click i have written this
int rowArr [] =jTable1.getSelectedRows();
for(int rowId:rowArr)
try
// System.out.println(sorter.convertRowIndexToModel(rowId));
sorter.getModel().fireTableRowsDeleted(jTable1.convertRowIndexToModel(rowId), jTable1.convertRowIndexToModel(rowId));
//sorter.rowsDeleted(rowId, rowId);
int stuId = Integer.valueOf(String.valueOf(jTable1.getValueAt(rowId, 0)));
int sessId= Singleton.getInstance().session_id;
conn = Singleton.getInstance().makeConnection();
query="DELETE FROM student_class WHERE student_id =? AND admClass1 AND session_id=?"; // 7
s=conn.prepareStatement(query);
s.setInt(1,stuId);
s.setInt(2,sessId);
s.execute();
}catch(Exception e)
e.printStackTrace();
}Do not think that i want multiple records to be delete i m selecting only one record but when i click on the remove button it gives me the following stack trace:
java.lang.IndexOutOfBoundsException: Invalid range
at javax.swing.DefaultRowSorter.checkAgainstModel(DefaultRowSorter.java:921)
at javax.swing.DefaultRowSorter.rowsDeleted(DefaultRowSorter.java:878)
at javax.swing.JTable.notifySorter(JTable.java:4277)
at javax.swing.JTable.sortedTableChanged(JTable.java:4121)
at javax.swing.JTable.tableChanged(JTable.java:4398)
at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:296)
at dps.StudentTableModel.fireTableChanged(StudentTableModel.java:465)
at javax.swing.table.AbstractTableModel.fireTableRowsDeleted(AbstractTableModel.java:261)
at dps.StudentTableModel.fireTableRowsDeleted(StudentTableModel.java:475)
at dps.StudentDialog.jButton5ActionPerformed(StudentDialog.java:1360)
at dps.StudentDialog.access$1600(StudentDialog.java:56)
at dps.StudentDialog$18.actionPerformed(StudentDialog.java:441)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6504)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6269)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4860)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4686)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2713)
at java.awt.Component.dispatchEvent(Component.java:4686)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
at java.awt.EventQueue.access$000(EventQueue.java:101)
at java.awt.EventQueue$3.run(EventQueue.java:666)
at java.awt.EventQueue$3.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:680)
at java.awt.EventQueue$4.run(EventQueue.java:678)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Use your debugger and step though to actually see what is happening, also if you have N rows and one is removed you then only have N-1 rows and any attempt to address the container with N rows will fail.

Similar Messages

  • In Office 2011 the function "share it by e-mail" seems to be disabled. that happened recently, just after the apple update regarding Java. Any idea on how enable this function again?

    in Office 2011 the function "share it by e-mail" seems to be disabled. that happened recently, just after the apple update regarding Java. Any idea on how enable this function again?

    I was able to get to a support person who helped me fix this without charge. I guess it was my bad for not trying the right way to access support.
    Anyway, they answer is this.
    I had to create a new account on my computer. When I logged into the new account it immediately wanted an AppleID. I used my daughter's e-mail address for the AppleID. This setup the internet accounts correctly with her iCloud.com e-mail address. I was then able to access e-mail in both the browser and Mail. Not that complicated but nothing that I would have easily thought up on my own.
    Thank Apple Support!

  • Apple maps has received a poor performance rating just after introduction of the iPhone 5. I am running google maps app on the phone. Siri cannot seem to get me to a specific address. Where does the problem lie? Thanks.

    Apple maps has received a poor performance rating just after introduction of the iPhone 5. I am running Google Maps app on the phone. SIRI cannot seem to get me to a specific address. Where does the problem lie? Also can anyone tell me the hierarchy of use between the Apple Maps, SIRI, and Google maps when the app is on the phone? How do you choose one over the other as the default map usage? Or better still how do you suppress SIRI from using the Apple maps app when requesting a "go to"?
    I have placed an address location into the CONTACTS list and when I ask SIRI to "take me there" it found a TOTALLY different location in the metro area with the same street name. I have included the address, the quadrant, (NE) and the ZIP code into the CONTACTS list. As it turns out, no amount of canceling the trip or relocating the address in the CONTACTS list line would prevent SIRI from taking me to this bogus location. FINALLY I typed in Northeast for NE in the CONTACTS list (NE being the accepted method of defining the USPS location quadrant) , canceled the current map route and it finally found the correct address. This problem would normally not demand such a response from me to have it fixed but the address is one of a hospital in the center of town and this hospital HAS a branch location in a similar part of town (NOT the original address SIRI was trying to take me to). This screw up could be dangerous if not catastrophic to someone who was looking for a hospital location fast and did not know of these two similar locations. After all the whole POINT of directions is not just whimsical pasttime or convenience. In a pinch people need to rely on this function. OR, are my expectations set too high? 
    How does the iPhone select between one app or the other (Apple Maps or Gppgle Maps) as it relates to SIRI finding and showing a map route?  
    Why does SIRI return an address that is NOT the correct address nor is the returned location in the requested ZIP code?
    Is there a known bug in the CONTACTS list that demands the USPS quadrant ID be spelled out, as opposed to abreviated, to permit SIRI to do its routing?
    Thanks for any clarification on these matters.

    siri will only use apple maps, this cannot be changed. you could try google voice in the google app.

  • Is there a way to stop a query just after the cursor/plan is produced by CBO?

    Following suggestions of Kerry Osborne&amp;#8217;s Oracle Blog &amp;raquo; Blog Archive &amp;raquo; Explain Plan Lies &amp;#8211; Kerry Osborn…
    on the lies of "Explain plan" (and of "set autotrace on"  too) I'd like to try to stop a query/DML before actually it starts, just after the plan was produced and sql_id assigned.
    Is there any CLEAN way (other than trying CTRL-C) to do that?
    Thanks
    Paolo

    Hi
    PaolFili wrote:
    Thanks rp.
    I think my question is a little dofferent, but your reply give me an idea.(which has clear disadvantages , but can do the work).
    The problem is obtain in Lybrary Cache a plan,a SLQ_ID,PLAN_HASH for a query ( i.e. a 10days running query) that I cannot start-up.
    So my (suggested from your reply) idea is:
    1) to LOCK EXCLUSIVE (a table level) , **if it's possible** every table accessed in the query ( Yes, it can be really expansive in some production environment, but sometimes can be necessary ..)
      using :  LOCK TABLE table IN EXCLUSIVE MODE
    for each table accessed from query
    2) Startup the query that will be suspended form the lock on tables accessed + kill the sid,serial#,@Inst_id for the query.
    3) UNLOCK tables from EXCLUSIVE using "ROLLBACK"  in the session where LOCK TABLE.... was send.(to remake  tables to work for other queries)
    Any other ideas?
    Thanks
    Paolo
    you're planning on using locks to stop a query and you think in order to do so you need exclusive locks  on every table accessed in the query? And you are prepared to do that on a production system?
    And all of this is needed to troubleshoot a query that was running for 10 days -- i.e. a query that was available for all kinds of diagnostics during 10 days?
    Sorry, I think it wasn't a good idea for you to read that Osborne's blog post -- you should've started with more basic things. Way more basic.
    Best regards,
      Nikolay

  • Macbook air Wi Fi and sound stops every time it goes to sleep. i have to  restart it every time to use wifi and sounds. this started happening just after the latest upgrade to X. any reasons why its doing that and how to fix it.

    Macbook air Wi Fi and sound stops every time it goes to sleep. i have to  restart it every time to use wifi and sounds. this started happening just after the latest upgrade to OS X. any reasons why its doing that and how to fix it.

    Test after taking each of the following steps. Back up all data before making any changes.
    1. Make sure the network is on the preferred list by following these instructions. It's important to read the article carefully, as it's the starting point for any further efforts to solve the problem. If you skip any of the steps, the problem may not be solved.
    2. Follow the instructions in this support article under the heading "Symptom: The network connection drops unexpectedly."
    3. Make a note of all your settings for Wi-Fi in the Network preference pane, then delete the connection from the connection list and recreate it with the same settings. You do this by clicking the plus-sign icon below the connection list, and selecting Wi-Fi as the interface in the sheet that opens. Select Join other network from the Network Name menu, then select your network. Enter the password when prompted and save it in the keychain.
    4. From the Location menu at the top of the Network preference pane, select Edit Locations. A sheet will drop down. Click the plus-sign button to create a new location. Give it any name you want. In the new location, set up the Wi-Fi service with the same settings you used before. Click Apply and test.
    5. Launch the Keychain Access application. Search for and delete all AirPort network password items that refer to the network. Make a note of the password first.
    6. In some cases, the problem has been resolved by repairing permissions on the startup volume.
    7. Turn off Bluetooth and test.
    8. Reinstall OS X.

  • Satellite M100-233: shuts down just after the XP logo

    Hi,
    I have a Satellite M100-233 with XP Home Edition SP3 (in Portuguese)
    When connected to the mains and the battery is not totally charged, sometimes the amber light does not light up.
    Checking the voltmeter application when this happens tells me that the battery is on, the source of energy is the mains, but the battery is discharging.
    As I keep using the laptop, the amount of battery charged is reported as progressively less, until it goes to zero, and then the laptop just turns off, as if it was not connected to the mains.
    Even if I start with the battery charged at 100%, after a couple of hours (sometimes more, sometimes less) the same thing happens.
    At an authorized dealer, they told me that probably it was a short circuited battery.
    *I don't buy that:* if it take the battery off the laptop and turn it on:
    - Most of the times it shuts itself down just after the XP logo.
    - It appears this happens more often when the battery was not totally charged the last time I used it (Strange! Am I imagining this?)
    - This happens also sometimes after I've been using the laptop for sometime
    The only unusual bios message I get is "No TPM or TPM has problem". I guess this has to do with cryptographic protection, so I imagine it has nothing to do with this issue.
    About two years ago there was a problem with the battery (it stopped from being recognized as present by the laptop) which was repaired under the warranty: they told me they had replaced the motherboard then. However, at that time I could keep working normally without the battery, which is not the case now.
    I would be grateful for any hints. The most annoying thing is that this problem follows a irregular pattern, and the diagnostic the authorized dealer gave me looks hard to believe. As I use my laptop to collect data for research abroad, it is quite a risk for me to use it if I can't be sure when it will shut itself down of its own will.

    Hi
    To be honest I doubt that someone here in the forum would be able to provide an exactly answer to this issue
    I think its nearly impossible to say whats wrong without running any hardware checks.
    But for me it sounds like an motherboard issue possibly its power supply electronic issue which is a part of the motherboard.
    What to say maybe you need new motherboard but the new mobo is an expensive part and in my opinion you should firstly check if its worth to replace the motherboard or to purchase an second hand notebook for the same cash.

  • Collapsing function incorrectly collapses the following functions

    I'm trying out Flash Builder 4.6 and having an odd problem when collapsing functions. Sometimes after writing a new function, the IDE seems to decide that all functions that follow that function are nested with it; in other words, if I collapse that function, it collapses all of the following functions, even though they are the same heirarchy level and shouldn't collapse with it.
    Has anyone else had this issue? Any ideas how to fix it?
    Thanks.

    Hi,
    I think that you post in wrong forum.
    This is a forum for Business One, not for R3.
    Ribeiro Santos

  • Hi I am just after downloading ios 5 to my iphone but now the apps on my phone won't open or work? Any ideas as to why? thanks.

    Hi, I am just after downloading ios 5 to my iphone but now the apps on my phone won't work, even the free ones. Have tried deleting and reinstalling but it asks for credit card details even for the free apps. Any ideas as to why this is happening? Thanks

    If it is asking for account details then it might just need you to confirm your account before it lets you proceed. Maybe the terms and conditions changed since last time or something like that. Try signing into your Apple account in iTunes on a computer first to check that. Then restart the phone and try again.

  • Macbook pro eject the dvd just after instering them. Eject button dont work

    Hi there,
    I have a real problem with dvd drive. I inserted many CD/DVD into disk drive of my MBP but it eject them just after inserting even without reading them. It seems that eject button is stucked.
    So I forced a CD to stay in drive (I know I'm ...) and then the CD is stucked there.
    Also, when I click the eject button (beside F12), it do not work at all. I means that the eject screen picture do not appear on the screen.
    Any Ideas?
    Many thanks.
    Hassan

    Hi,
    At first glance it seems a hardware problem. But I have tried the DVD drive over network with another OS and it works fine. As mentioned in this post "http://discussions.apple.com/thread.jspa?threadID=2142828&start=15&tstart=0" by "Zungoeie", I contacted Apple store and they said that it's hardware problem and I have to replace my DVD drive (I have no warranty since two month). So as I'm computer engineer, I did not accept that it's a hardware problem as I've checked it with another OS. In the post cited above, one have proposed a SOFTWARE solution which I'm going to try tonight.

  • The message function on my Ipad just quit working.  I was using it while in Mexico and it just quit.  I have come home and synced my Ipad with Itunes and function still does not work.  How do I get this function to work again?

    The message function on my Ipad just quit working.  I was using it while in Mexico and it just quit.  I have come home and synced my Ipad with Itunes and function still does not work.  How do I get this function to work again?

    When I use find file http://www.macupdate.com/app/mac/30073/find-file (which does tend to find files that "Finder" can't), it's not coming up with any other itunes library files that have been modified in the past week, which I know it would have been - unfortunately, I don't have a very recent backup of the hard drive.  It would be a few months old so it wouldn't have the complete library on it....any ideas?  I'm wondering if restarting the computer might help but have been afraid to do so in case it would make it harder to recover anything...I was looking at this thread https://discussions.apple.com/thread/4211589?start=0&tstart=0 in the hopes that it might have a helpful suggestion but it's definitely a different scenario.

  • Will Windows 10 offer the following functionality

    Windows 10 installation experienced NO issues regarding support, driver installation, or crashes during use.
    Out of interest will Windows 10 offer the following functionality - either on release or by Update/SP 1 ?
    Support for compressed files other than .zip (i.e. RAR)
    Tabbed browsing in Windows exporer
    Media functionality that will allow the playing of presentation DVDs (Enterprise)
    Inclusion of MS Office - in a similar manner to Surface - for Home users (Home, Student & Standalone systems)
    Thanking you

    Windows supports 3rd party applications, such as 7-Zip, which in turn gives you things like .rar support.
    If you crave tabs I suggest that perhaps you may not have enough desktop space.  More / bigger monitors are a better, more direct solution, in my opinion, opposed to tabbed
    anything.  Microsoft, if you're listening and are considering making additional tabbed interfaces, please, PLEASE make them options that can be deconfigured.
    Why Microsoft has eliminated media capabilities since Windows 7 is really anyone's guess, but I'm betting it has to do with licensing fees.  I for one would pay a premium for a better, more capable edition (e.g., "Windows xx
    Ultimate", which is the edition I chose for Win 7 and Win Vista before that).
    I don't imagine Microsoft will be giving away Office any time soon.  But we can dream.
    -Noel
    Detailed how-to in my eBooks:  
    Configure The Windows 7 "To Work" Options
    Configure The Windows 8 "To Work" Options

  • My old computer died just after I transferred iTunes via external HD.  When I transferred the content from the HD to the new computer, most songs won't play.  Message is "Can't identify source".  Sharing was on in the old computer when it died.

    My old computer died just after I transferred iTunes via external HD.  When I transferred the content from the HD to the new computer, most songs won't play.  Message is "Can't identify source".  Sharing was on in the old computer when it died.

    Is there no ANSWER TO THIS PROBLEM?

  • My iphone has been locked and it shows the message as follows: "iphone is disabled please try after 15 minutes" and i don't remember the password

    My iphone 4 has been locked and it shows the message as follows: "iphone is disabled please try after 15 minutes" and i don't remember the password

    To enable the iPhone, restore via recovery mode following the instructions in http://support.apple.com/kb/HT1212 and it may be necessary to do so more than once to succeed.

  • Only half of the body just below the camera and steel side of camera side is getting heated up just after 10 , 15 mins of usage i my iphone  4 is it normal...as earlier the body was not heating up even after 2 hours....the problem started after updating t

    only half of the body just below the camera and steel side of camera side is getting heated up just after 10 , 15 mins of usage i my iphone  4 is it normal...as earlier the body was not heating up even after 2 hours....the problem started after updating to 6.1.2
    iPhone 4, iOS 6.1.2

    Hi, did you ever solve this problem?
    My 1 year old -- ha! one month out of warranty -- iPhone 4 has been having a nearly identical problem over the past few days.
    It started by dying completely so I had the battery replaced, thinking it was simply battery issue.
    It then worked again for a moment but started doing exactly what you describe, going through a reset cycle (longer than 30 seconds but who's counting). And it felt quite warm.
    Did hard reset, plugged into wall charger and MBP USB but the new battery wouldn't even get a full charge (a whopping 92% after nearly two days). It would even lose battery when plugged in if I opened an app. And all the while plugged in, if I left the phone on, it would cycle through these resets. So I turned it off to try to charge it.
    Now suddenly, it's dead again. Totally black, and hard reset does nothing. Up until two days ago there was nothing wrong whatsoever with this phone! And I hadn't even installed a new app that could be the root of the issue. No idea whatsoever what caused this.
    Any help would be much appreciated!!

  • HT204053 Our Apple ID is ok and functioning.  However, I just came on as the IT for the group and cannot find how to change the name.

    Our Apple ID is ok and functioning.  However, I just came on as the IT for the group and cannot find how to change the name.

    Assuming you mean the personal name associated with the account, as opposed to the login (which you can change if it's not an @icloud.com. @me.com or @mac.com address) you can change this at http://appleid.appla.com . Click on 'Manage your account' and then on 'Edit' next to 'Your name' and the name currently associated with the ID.

Maybe you are looking for

  • How to print preview in a popup window?

    There are couple of websites that I use frequently and they open links up into popup windows that I would like to print using print preview so I don't waste paper. Is there a way to do print preview from a popup window or can I open popup windows in

  • Uploading an excel file in an internal table.

    hi experts, I m trying to upload a excel file comprising of 16,000 records using the function module 'ALSM_EXCEL_TO_INTERNAL_TABLE' as follws CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'        EXPORTING             filename                = p_input

  • Problem ADDING ITEM

    Hello there!!! I am having problems trying to add a new item in a content area, the following error pop up: ORA-01403: no data found ORA-06512: at "PORTAL.WWV_ADDITEM", line 270 ORA-06512: at line 7 DAD name: portal PROCEDURE : PORTAL.wwv_additem.add

  • Iphone 5 broken power button and locked screen

    so i bought a used iphone 5 and it has a locked screen so i cant reset it is there anyway to reset it

  • Flash player 11.5 updated using ie8 and firefox wont work Youtube

    Flash player 11.5 updated using ie8 and firefox wont work Youtube Its impossible because after the update i researched and did alot to downgrade and it wont work. Only domain administrators can play youtube movies. the other simple users cannot play