Association between Jcheckboxes and lines of JTable

Hello everybody,
I would like to add a JChekBox to each line of my JTable knowing that the number of lines is given only at the time of the execution. The problem is that the contructor of JscrollPane can take only one JComponent in parameters:
JScrollPane scrollpane=new JScrollPane(MyJTable);
How can I make association line-JChekBox dynamically.
I m waiting for your answers impatiently.
Thank you for being attentive

I don't understand your question. You where given a link to the JTable tutorial, that showed you how to add check boxes to the table.
This is done by adding Boolean values to the TableModel. So once you know the number of rows in the table you create a simple loop and do:
table.setValueAt(row, new Boolean(true) );

Similar Messages

  • Need one space between text and line color

    Is there any way to offset the text from the border a bit? I
    would like to have a black line around some boilerplate text,
    but the text is always butted against the border. Is there a
    way to offset the text a bit

    HamidHelal wrote:
    Lan_Desu wrote:
    Please, help me.
    Is there any way to offset the text from the border a bit?
    I would like to have a black line around some boilerplate text, but the text is always butted against the border. Is there a way to offset the text a bit ?
    I've been searching in this forum and google and didn't find the answer yet.
    Hi, Lan
    if yo want to place a line you may choose underline option. Otherwise take a line/draw a line and keep space between the text and line.
    Hope this helps
    HamidIs there a way easily?
    I already know that that solution. But it is troublesome when I face editing later - I have to edit all of it.
    But thanks for the answer :)

  • Inconsistencies between Balance and Line items

    Hello masters!
    I found some inconsistencies betwen balance and line items. I tried to solve the problem using  FAGLF03 and RFINDEX (when executing SAP retrieved: "New GL is active. GLT0 can not be adjusted") but both did not work.
    We have never gone trough an archiving process.
    Thanx
    Edited by: Naej on Jun 15, 2010 11:00 PM
    Edited by: Naej on Jun 15, 2010 11:01 PM

    Hi,
    This will happen only if you activate line item management after started posting that GL account
    Please execute program RFSEPA01 to set right this.
    Best Regards,
    Madhu

  • Where is the association between applications and Spaces screen configured in Mountain Lion?

    Where is the assocation between Applications and Spaces screen configured in Mountain Lion?
    In 10.6, I had FileMaker come up in Space 2, and it still does in 10.8 but I don't know how to change it.
    Anyone know?

    Right-click the icon in Dock and select Options

  • Different figure display between Balance and Line items

    How can I find out the difference between line item and Balance in FS10n?
    Actually when I Executing the FS10N the balance of DR. balance is greater then that account Dr. Balance line item.
    Can any one tell me why?
    Thanks & Regards,
    Anandakumar

    Its a sundry debtors gl account. All the line item and open item transaction balance are displaying.
    but the amount is not displaying (difference amount).
    Any one has solution pls tell me.
    Thanks in Advance,
    Anandkumar

  • Tab between cells and Editor in JTable

    I placed a cell editor in a JTable column JTextField.
    After I type something in this editor and press tab it stays in the same cell and when I press tab again then it goes to the next column.
    How can I correct this so that after I type something in the cell and press tab I want it to go to the next column directly in JTable.
    Thanks.

    I'd have to see your code to tell you what's wrong. I tried it this way and had no problem.
    TableColumn tc = table.getColumnModel().getColumn(2);
    tc.setCellEditor(new DefaultCellEditor(new JTextField()));by the way, I don't think you need to explicitly set the cell editor component to JTextField. It uses that by default.

  • Tab between cells and celleditor in JTable

    I placed a cell editor in a JTable column JTextField.
    After I type something in this editor and press tab it stays in the same cell and when I press tab again then it goes to the next column.
    How can I correct this so that After I type something in the cell and press tab I want it to go to the next column directly in JTable.
    Thanks.

    I'd have to see your code to tell you what's wrong. I tried it this way and had no problem.
    TableColumn tc = table.getColumnModel().getColumn(2);
    tc.setCellEditor(new DefaultCellEditor(new JTextField()));by the way, I don't think you need to explicitly set the cell editor component to JTextField. It uses that by default.

  • How to get association between site and project on PWA_Content DB

    Hello everybody.
    I'm trying to get data from lists of all project sites on Project Server.
    I'm using this query to get it: 
    select c.ntext2,b.MasterUrl, c.tp_Modified
     from PWA_Content.dbo.Lists a left join PWA_Content.dbo.Webs b on b.Id=a.tp_WebId 
     left join PWA_Content.dbo.UserDataVersioned c on a.tp_ID=c.tp_ListId 
     where a.tp_Title like '%Postagens%' order by b.masterurl,c.tp_Modified
    But this query shows posts of lists Postagens of all project sites. I need to filter it by ProjectName to show only posts of one project on each search. 
    I looked for a match between projectname or projectid and something on PWA_Content.dbo.Webs or PWA_Content.dbo.Sites views. I tried to Split MasterUrl field to match project name but some projects have different site names and project names.
    Can somebody help?
    Thanks.
    Gabriel.

    Hi Gabriel
    I might be missing something here, couldn't understand your question fully, but if it is related to project sites, why not to query it from MSP_EPMProject_Userview from project server DB(reporting Db if version is 2010)and get it from there ?
    Something like this
    SELECT
    ProjectUID, ProjectName, ProjectWorkspaceInternalHRef
    FROM MSP_EpmProject_UserView
    Thanks | Sunil Kr Singh | http://epmxperts.wordpress.com

  • Are there two type of associations between objects or are there just different representations?

    I've been spending some time on 're-tuning' some of my OOP understanding, and I've come up against a concept that is confusing me.
    Lets say I have two objects. A user object
    and an account object.
    Back to basics here, but each object has state, behaviour and identity (often referred to as an entity object).
    The user object
    manages behaviour purely associated with a user, for example we could have a login(credentials) method
    that returns if successfully logged in or throws exception if not.
    The account object
    manages behaviour purely associated with a users account. For example we could have a method checkActive() that checks if the account is active. The account object checks if the account has an up-to-date subscription, checks if there are any admin flags added
    which would make it inactive. It returns if checks pass, or throws exception if not.
    Now here lies my problem. There is clearly a relationship between user and account,
    but I feel that there are actually two TYPES of association to consider. One that is data driven (exists only in the data/state of the objects and the database) and one that is behaviour driven (represents an object call to methods of the associated object).
    Data Driven Association
    In the example I have presented, there is clearly a data association between user and account.
    In a database schema we could have the following table:
    USER_ACCOUNTS
    id
    user_id
    When we instantiate the account and
    load the database data into it, there will be a class variable containing user_id.
    In essence, the account object
    holds an integer representation of user through user_id
    Behaviour Driven Association
    Behaviour driven associations are really the dependencies of an object. If object A calls methods on object B there is an association going from A to B. A holds an object representation of B.
    In my example case, neither the user object
    nor the account object
    depend on each other to perform their tasks i.e. neither object calls methods on the other object. There is therefore no behaviour driven association between the two and neither object holds an object reference to the other.
    Question
    Is the case I presented purely a case of entity representation? The association between user and account is
    always present, but its being represented in different ways?
    ie. the user entity
    has an identity that can be represented in different forms. It can be represented as an object (the instantiated user object)
    or as a unique integer from the users table in the databases.
    Is this a formalised way of recognising different implementations of associations or have I completely lost my mind?
    One thing that bugs me is how would I describe the differences in UML or similar? Or is it just an implementation detail?

    It s a bit hard to fully understand what is problem actually in :). I think you are a bit mixing some concepts.
    Entities representation
    At first, all models we are implementing is just a simplification of some real-world objects and environment. Your conceptual entity user corresponds to some real user and contains some attributes we are intresteing in according to application needs. Thus there
    are some models we have to implement.
    Thus, all user defined by DB schema, user defined by class, and probably user defined by some presentation logic is normally present some real-world user. It is only about implementation purposes, we have to store, view and manipulate with user.
    On the other hand let's take a look on Single Responsibility Principle. It tells us to use every class or program unit just for certain needs. Using single user (class or program unit) for storage and presentation needs violates this principles.
    the user entity has an identity that can be represented in different forms. It can be represented as an object (the instantiated user object) or as a unique integer from the users table in the
    databases.
    So, the answer is yes.
    Associations and dependencies
    I think it is more about terminology than about nature of problem. But in general you are right - there are different types of object realtions (especially, I will use other terms to list it). For example "referencing", "creation", "using",
    "coordinating", "storing", "inheriting" (!) ....
    According to this, user instance references account instance. And A instance uses B instance.
    For most cases it is good enough to distinguish just "referencing" and "using". It is what you've just written. It's enough common and abstract to be understood by other person when talking about domain, e.g.
    But sometimes, to emphasize some aspects you should describe relations in a way like "A dispatches ensemble of Bs" or "R stores X to database". It's more applicable for specification and modelling.
    Is this a formalised way of recognising different implementations of associations or have I completely lost my mind?
    To call something formalized I suggest to look at UML.
    UML and other modelling instruments
    One thing that bugs me is how would I describe the differences in UML or similar? Or is it just an implementation detail?
    There are a lot of UML models (diagrams). Let's take a look at most well-known - Classes and Objects Diagram.
    It's interesting that UML allows to present all type of object relations, and moreover allows to decide "is it just an implementation detail".
    Martin Fowler describes 3 levels (or point of views) of understanding of Classes Diagram.
    Conceptual. Diagram is considered as high-level domain model, independent from implementation.
    Specification. Diagram is considered as high-level realization model containing of interfaces.
    Implementation. Diagram is considered as low-level technical paper containing interfaces, classes, references, other types of relations.
    Is this a formalised way of recognising different implementations of associations or have I completely lost my mind?
    Yes, you have to fix some point of view and choose appropriate relations set.
    For example, let's take a look at Classes Diagram and consider it from an implementation point of view. UML defines 3 type of relations (and propose corresponding means to its designation):
    Association
    Association corresponds "referencing" between instances.
    Dependency
    Dependency combines all types of relations such as "using", "creating", "storing", etc.
    Inheritance.
    Inheritances as a fundamental OOP instrument is presented by UML in a distinct way. It's more about classes than about instances, but also one can say that A instance inherit attributes of B instance. So, that's ok.
    First and second points of view on Class Diagram, as I remember uses only one type of relation unifying both associations and dependencies and is designated like association (no inheritance, of course).
    Also, UML proposes Objects Diagram which is same to Classes Diagram, but fits better for runtime modelling needs.
    Finally, a choice of a set of relations taken into consideration depends on a context and point of view. UML provides some ones.

  • Applet font problem between linux and windows

    I just want to share my experience in several project i've taken part.
    In some projects, where all are developed under linux environment (suse 9.2),
    we use jasper report for report generation and use the web applet for our clients to print.
    They print ok in linux env, with the netscape 7.1, courier 10 font and jvm 1.4.2_06b version.
    But when accessed from windows env, with the same browser and the same jvm version, the applet and the print out are different from those of lin env. The headers and footers are missing. When the we edit/lower the header and footer size at the jasper report file, then they appears @ the window env.
    So strange that the font handling between win and lin differ (still my assumption). I'vent been able to solve this problem totally since the client must stick with one OS else the print out will be different.
    Quite dissatisfied, coz i really think i could code once the report and run it anywhere in the applet and behaves in the same way.
    Could anybody help ? T-T
    Regards,
    Albert Gan

    hi!
    this is my first post and i would like to ask if how did you create the web applet printing. im totally new to java and i dont know where to start.
    i hope that you can guide me or give me some instructions. thanks in advance =)

  • Link between Delivery and Sales Order Schedule Line

    Hi Gurus,
    I have a requirement in which i need to display quantity and amount at schedule line level and also the delivery and delivery item for each schedule line.
    For example, if there is a sales order O1 and item 10 for which we have 3 schedule lines and 3 deliveries as well say D1, D2 and D3.
    Report should be something like this
    Sales Order    Item   Schedule Line    Delivery    Del Item   Confirmed Order Qty
    O1                 10      1                       D1           10            5
    O1                 10       2                      D2            10            5
    O1                 10       3                      D3            10            4
    How can i determine that a particular delivery corresponds to which schedule line of that saler order-item?
    We have the link between delivery and sales order but is there any way that we can get the link of delivery at schedule line level?
    Please help.
    Regards,
    Gaurav

    Hi,
    I suppose you must check with SD functional consultant and the post should also be in the logistics SD forum and not BI. But I suppose there is know specific link between the schedule line of SO to the Delivery. It is more like a bucket flow for ex.
    Sale order   Item    Schedule line  qty
    SO1            Item1     Sch1            10
    SO2            Item1      Sch2           10
    Delivery Item QTy
    DO1       IT1   15
    DO2       IT1    5
    In this case qty 15 is distributed over both SO1 and SO2, and SO2 ITem1 Sch2 has link to both the DOs
    So I am not sure if you can establish a one to one link, please check with your SD consultants.
    Regards,
    Ashwin G

  • Is there a DIRECT link between SD schedule lines and delivery lines?

    Is there a direct link (db table) between schedule lines on a sales order (VBEP) and the delivery lines (LIPS)? 
    Is there a function module to retrieve the data?
    Example-
    One order line with 3 schedule lines.
    Each schedule line is for 2 units (total of 6 units).
    Three deliveries made.  1st is for 2 units, 2nd is for 1 unit (backorder), 3rd is for 3 units.
    You can use document flow (table VBFA) or examine the SD document in the delivery line (LIPS) and link the delivery line to the order line.  The schedule line already references the order line.
    I am using math to decrement the schedule lines used and make the link between VBEP and LIPS.  It works fine.  I need four records back....
    1st schedule line for 2 units uses delivery 123
    2nd schedule line for 1 unit (partial) uses delivery 124
    2nd schedule line for 1 unit (partial) uses delivery 125
    3rd schedule line for 2 units uses delivery 125
    Like I said, it works. Just wondering if I missed a more direct link.

    As far as Db link is concern , I don’t remember exactly , but 3 years before I had written a report which see Sales order schedule lines and devilry note lines against sales order.  If you see process wise…. when ever you create PO ( production order you assign some qty using 101 movement type .. and against production order you also give sales order . When you do delivery ( run seclude run ) it delivers against that material number , its movement is 601 ...
    but I remember there’s a link between these tables, VBAP,VBFA AND VBEP , LIPS ...  against every sales order you can see sales invoice ( VBRP,VBRK) and you can also see your delivery note number in document flow .
    I hope this’ll give you some guide line, as right now I can not tell you the exact business process but I remember I written a report in SD 4 years before , in which they required Delivery against production order and sales order ... One more thing you also have production order reference on delivery item number. ( field :Empst ) . I think in my project they were maintaining this field .
    Thanks

  • Link between the Schedule Lines and the GR document

    Hi
    I would like to find the link between the Schedule Lines (of Scheduling Agreement) and the GR document. i.e. which GR has been made against which Schedule Line. I have checked the tables EKET, EKBE, MSEG but there is no link with the Schedule Line, I found the link only with the item number there.
    Thanks
    Prashanth

    Hi
    At the time of posting the GR for a SA you will be not posting this with reference to the Schedule line of the SA item. So system will always update the GR document against the SA item and update qty on the schedule line.
    May be this is the reason we donot have any direct relation ship to material document and Scheclue line
    Thanks & Regards
    Kishore

  • Link between Delivery schedule line counter from PO and the material docume

    Dear Gurus,
    I have one PO with single line item having delivery schedule -
    Material 1 -
    delivery schedule 01.01.2009     2000
                                                         01.03.2009    5000
    I have received quantity against this Po
    I want to know where I can find the link between Delivery schedule line counter from PO and the material document
    Best regards
    Sar

    There is no link from the MAterial document line item (Table Mseg) to the PO Schedule Line (EKET).
    If this is for Evaluating an on time delivery or GR, you may consider the following approach.
    PO details Po Date  QTY
    Sch1   01Jun2009   200   
    SCH2  08Jun2009   100
    GR Details
    GR1   01Jun2009   180
    GR2   07Jun2009   110
    GR3  09Jun2009      10
    Calculate a *** total qty for the PO Line.
    PO details Po Date  CUMUL QTY
    Sch1   01Jun2009   200   
    SCH2  08Jun2009   300
    Calculate a *** total qty for the ontime GR.
    PO details Po Date  CUMUL PO QTY  CUMUL GR on time
    Sch1   01Jun2009   200                180
    SCH2  08Jun2009   300                 290 (180+110)  the 3rd GR was too late
    Evaluate the PO SChedule Lines as follows:
    Po SCL qty + CUMUL GR QTY - CUMUL PO QTY = ADJ GR ON Time Qty
    SCH1 01Jun2009
    200 + 180 - 200 = 180 on time for 01Jun2009 date ( 90% fill rate)
    SCH2 08Jun2009
    100 + 290 - 300 = 90 on time for 08Jun2009 date (90 % fill rate) the first 20 of the GR on 07Jun2009 went to fill the late, early date.
    Best of luck !
    SCH2 100 +290 - 300 = 90 on time for 07Jun2009 date

  • How can I adjust the space between the dividing line of the footnotes and the continuous text?

    How can I adjust the space between the dividing line of the footnotes and the continuous text?

    I want to extend the space so the dividing line does not stuck to the normal (continuous) text in my thesis. Do you have a solution? That would be perfect. Thanks a lot!

Maybe you are looking for

  • Mail app cannot open, can I re-install one?

    I tried to add an assistant program on the mail app, but now I cannot open it. Is there anyway i can re-install the mail app? It is OS X 10.8.4 Thanks.

  • Reading masterdata of attribute in BI 7.0

    Hello Gurus I have the following situation: I am creating a transformation from an ODS to the Cube. I have an InfoObject in the cube which should be populated based on the value of another InfoObject in the ODS (which is a navigation attribute of ano

  • How to update my iPad IOS4.3.3 to IOS7?

    How can I update my IOS 4.3.3 to IOS7? Do I need to use ITunes? Please send me a link for advice how to do it?

  • [SOLVED]xstart works exclusively as root

    I had this happen multiple times, on different installs. When using startx, it only works as root. There doesn't seem to be any problems in the xorg log, either. Last edited by democracy (2009-08-20 04:24:44)

  • Overcharged for Camera Connection Kit

    Hi, I just bought a iPad Camera Connection Kit from a third-party reseller in Singapore for SGD45. I realised the price that the Singapore Apple Store is selling for SGD38. Is the reseller allowed to sell at a higher price (in this case, 18% higher)?