Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8193917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:38:40+00:00 2026-06-07T04:38:40+00:00

I have my own TableModel implementation designed to show data from a SQL database.

  • 0

I have my own TableModel implementation designed to show data from a SQL database. I have overidden all the necessary methods, using a String array for column names, an arraylist<Object[]> for data and Class<?>[] array for all the different types that can be retrieved from the database. I also have a boolean array that dictates which columns are editable and which are not. Before I had everything in the table stored as an Object and hadn’t implemented the types part yet and it was working well. Now that I’ve added the types to the model, I can’t edit any column of the int type even though that column is editable in my boolean array. I have overridden the isEditable() method to simply return the value from that boolean array, and that returns true on the into column in question – but it is still uneditable. Is this define behaviour or is something wrong? I’m afraid I can’t post code at the moment because I’m on my phone, my laptop has no internet connection at the moment and won’t until the end of the week. I’ve searched but Google only shows lots of questions about making cells editable or uneditable, not why you cannot edit an int column.
EDIT: here’s a pastebin showing my problem: http://pastebin.com/cYJnyyqy

Using jdk7 and only the string column is editable, even though isEditable() returns true for all columns.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T04:38:41+00:00Added an answer on June 7, 2026 at 4:38 am

    Hmm. I’ve never used the raw types (e.g. int.class) for the getColumnClass(). I’ve always used the “wrapped” types, e.g. Integer.class.

    Try changing your Class<?>[] types to use the wrapped classes instead of the primitives. e.g.

     Class<?>[] types = {
                String.class,
                Character.class,
                Integer.class,
                ...
    

    This may be needed for Swing to find the correct Renderer/TableCellEditor. But I’m not sure…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my own inherited App.Controller from Mvc.Controller which then all of my controllers
I have my own custom Content Provider that loads a database which contains the
We have our own blog system and the post data is stores a raw
i want to use asp.net membership provider for my own database i have own
I have my own game engine using C++ and OpenGL, but I have models
I have my own control which derives from StackPanel. This control contains two other
I have my own object class which I use as the data source for
I have my own SQL based session class. I want to automatically commit the
I have own component which works in my testing winform app good but when
I would like to make every EditText object have own title like in Pure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.