JTable Custom Cell Button Action using Java Swing

Java Custom JTable Cell Button Action
This video I will show how to custom jtable cell button action width event view, update and delete in java swing.
► More Tutorial :
► Animation Tutorial : • java animation tutorial
► Floating Action Button : • Floating Action Button...
🙏🙏🙏 Support me by subscribe 🙏🙏🙏
► Subscribe now : kzread.info...
► Any question comment below
► Source code : github.com/DJ-Raven/raven-jav...
► For support me join now
/ @laingraven

Пікірлер: 83

  • @pointer255
    @pointer255 Жыл бұрын

    5k subscriber congratulations, hope to have another 50k soon

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    I hope so too. Thank you

  • @musabnet
    @musabnet Жыл бұрын

    Ma bro 😍 I've been waiting for a long time thank you 🌹

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    You're welcome!

  • @MukeshYadav-pw8ui
    @MukeshYadav-pw8ui12 күн бұрын

    Wah bro very thanks for this type of tutorial you are suparb please don't add background music please speak and make tutorial

  • @MukeshYadav-pw8ui

    @MukeshYadav-pw8ui

    11 күн бұрын

    Dear brother I am new starting my Career as a java and I don't understand how to create custom ui and very frustrated but once your video get and watch something and understand how to make Ui in swing but one things I wants to say u please make the video amd tell and describe the why use this things and how to set and how to customise no need to add background music only tell them thank you God bless you

  • @ahmedahmed-cb5ol
    @ahmedahmed-cb5ol Жыл бұрын

    دائما افكارك رائعة

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    Thank you

  • @piratadelsurnic
    @piratadelsurnic4 ай бұрын

    Thank you, you are a great programmer bro!

  • @LaingRaven

    @LaingRaven

    4 ай бұрын

    I appreciate that!

  • @jaquelinedevjava
    @jaquelinedevjava Жыл бұрын

    OHHHHHH MY GOOD 😍😍😍😍 THANKS THANKS THANSK

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    You're welcome!

  • @Senpai-Jo
    @Senpai-Jo Жыл бұрын

    Thank You!!!

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    You're welcome!

  • @MRTN589
    @MRTN589 Жыл бұрын

    ty ty ty, de mucha ayuda el tutorial.

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    Thank you

  • @samiamrane456
    @samiamrane456 Жыл бұрын

    GREAT!!

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    Thank you

  • @mohammedak6689
    @mohammedak6689 Жыл бұрын

    👍👍👍

  • @shaidarebuar6079
    @shaidarebuar6079 Жыл бұрын

    You're amazing

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    Thank you

  • @sofianeissolah6643
    @sofianeissolah6643 Жыл бұрын

    Amazing

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    Thanks

  • @dastagiri936
    @dastagiri936 Жыл бұрын

    Hello can you continue the video with EDIT and VIEW option also

  • @sebastianlincopans.5231
    @sebastianlincopans.5231 Жыл бұрын

    Hello bro, very good video. How could I add rows dynamically?

  • @Lmdevs
    @Lmdevs Жыл бұрын

    Hi bro, your videos are great, the problem is you go so fast when coding, I think you have to go slowly so that everyone understand easy, and this will also allow you to gain a lot of subscribers

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    Thanks for the tip

  • @raphaelcotte9576
    @raphaelcotte9576 Жыл бұрын

    Hello, thanks for everithing, could you give the OnEdit function please ?

  • @antoniofarfan265
    @antoniofarfan265 Жыл бұрын

    ❤️

  • @adarmawan117
    @adarmawan117 Жыл бұрын

  • @fugeratube1334
    @fugeratube1334 Жыл бұрын

    😊😇🙏🙏

  • @mutalekabwe-yw8zb
    @mutalekabwe-yw8zb7 ай бұрын

    thanks bro you just helped me with a lot of work and how can i add a check box to the first colum

  • @LaingRaven

    @LaingRaven

    7 ай бұрын

    You can change the column class of jtable. right click on your jtable -> Table Contents.. -> tab `Columns` then change type to Boolean at column you want. To add data to row addRow(new Object[]{true,....})

  • @lassinaouattara1213
    @lassinaouattara1213 Жыл бұрын

    Thanks, you're the best, do you have un plan to develop UI using javafx?

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    No bro

  • @unalogicasimple1455
    @unalogicasimple1455 Жыл бұрын

    Wonderful job, is there a way to round the corners of a JTable?

  • @itsvoid2917

    @itsvoid2917

    7 ай бұрын

    This is probably too late, I don't personally have experience with the JTable class as I have never had to use it but there should be a rounded border class. If possible you could set the border of the JTable to a rounded border, I think through border factory.

  • @chetansinha06
    @chetansinha06 Жыл бұрын

    Hey I used this code to add sort of a Book button in the last column of Jtable. Whenever I retrieve data into jtable from the database The last column disappears. Please help me if you can.

  • @ernanfer2
    @ernanfer25 ай бұрын

    Hi...how can I implement it with database , when de custom clicked on cell delete can delete cell an register in the table of database? Thank ya

  • @blowncotton6987
    @blowncotton69876 ай бұрын

    Hello bro, if i were to use a db4o database to store and view the data inside where do i put it

  • @karesmanetoquaresms8330
    @karesmanetoquaresms8330 Жыл бұрын

    Nice! I would like to use it from a jPanel, it´s possible?

  • @sebastianlincopans.5231
    @sebastianlincopans.5231 Жыл бұрын

    Could you help me with the code to create a button to create the rows?

  • @behnamn5106
    @behnamn5106 Жыл бұрын

    Hello Thank you for your good training. I have a problem, I can't put the "Action.Button" class on the "JPanel"

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    Build your project or run the project . and try again

  • @behnamn5106

    @behnamn5106

    Жыл бұрын

    ​@@LaingRaven Thank you for your answer But it didn't work java.lang.IllegalArgumentException: failed to parse:application/x-java-openide-dataobjectdnd;class=org.openide.loaders.DataObject;mask=۴

  • @aponahmed4810
    @aponahmed48109 ай бұрын

    Action button click event not working when I set table model("table.setModel()"), Any solution Please ?

  • @carlosvargas5462
    @carlosvargas5462 Жыл бұрын

    I tried to pass it to jdk 11 but it has some bugs when it comes to scrolling, could you upload a video about it or upload the code in jdk 11 I already gave the project a star and thanks for sharing the source code

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    It's work well for me. If you have some bugs you can screenshot and send to my facebook page. link in my youtube cover

  • @clebergod1477
    @clebergod1477 Жыл бұрын

    Man, could you make a vide teaching how to save or refresh a content of a jFrame and after that this content is showed on a jtable on another jFrame?

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    I will check it next

  • @clebergod1477

    @clebergod1477

    Жыл бұрын

    @@LaingRaven tks bro ❤

  • @MrBokplaks
    @MrBokplaks Жыл бұрын

    Can you give this example display database in jtable

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    You can watch this video kzread.info/dash/bejne/mKOO0NSNosi1ips.html

  • @jhondarwintantapomamejia3458
    @jhondarwintantapomamejia34587 ай бұрын

    run-single: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "java.net.URL.toExternalForm()" because "location" is null help!!!!

  • @themehakcodes
    @themehakcodesАй бұрын

    can i use this code in comercial project i am making an sofwatre for persnoloa use and also selling can i use it this thing

  • @LaingRaven

    @LaingRaven

    Ай бұрын

    yes it free to use :)

  • @PcSite
    @PcSite Жыл бұрын

    I also want to ask you about changing table field titles from left to right. Is there a solution?

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    You mean change title text alignment ?

  • @PcSite

    @PcSite

    Жыл бұрын

    @@LaingRaven yes mean change title text alignment and When entering data

  • @wed.360
    @wed.3607 ай бұрын

    Bro, How to make 2 different tabel with that?

  • @LaingRaven

    @LaingRaven

    7 ай бұрын

    2 or 3 table as the same. You can try it.

  • @seanoctavo7297
    @seanoctavo72974 ай бұрын

    Is it possible to do this on IntelliJ?

  • @LaingRaven

    @LaingRaven

    4 ай бұрын

    Yes

  • @felipemichel7037
    @felipemichel70373 ай бұрын

    Is it possible to do this on Eclipse?

  • @LaingRaven

    @LaingRaven

    3 ай бұрын

    Yes, It can

  • @thoile5037
    @thoile50374 ай бұрын

    hello bro. how to set mouse move setSelectionBackground and setSelectionForeground ?

  • @LaingRaven

    @LaingRaven

    4 ай бұрын

    You want mouse hover table rows ? Check this project : github.com/DJ-Raven/jtable-custom-swing/blob/8cd9969eec73d266f9b81d6de93b119b84238bf8/src/table/TableCustomCellRender.java#L24

  • @thoile5037

    @thoile5037

    4 ай бұрын

    @@LaingRaven thanks you.

  • @jeromehiggins3678
    @jeromehiggins3678 Жыл бұрын

    promo sm

  • @maximilianoanachuri1657
    @maximilianoanachuri1657 Жыл бұрын

    When i update content table and i click on table, it throw a arrayindexofboundexception

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    Your error was here 9:35 let check it

  • @maximilianoanachuri1657

    @maximilianoanachuri1657

    Жыл бұрын

    @@LaingRaven thank you

  • @rauljimenez5364
    @rauljimenez5364 Жыл бұрын

    Bro puedes pasar el proyecto

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    You want source code ? Link in description video

  • @rauljimenez5364

    @rauljimenez5364

    Жыл бұрын

    @@LaingRaven oye bro me ayudas en un proyecto hablemos te interesara 💎

  • @kajaplayer1866
    @kajaplayer1866 Жыл бұрын

    Bro, can you somehow make some column in the row that we click the edit icon from uneditable to editable ? That would be grate !!! Thanks bro 😍😍😍

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    You can use method table.setCellEditor than new with DefaultCellEditor and override isCellEditable then implement it

  • @M-UmarDraz
    @M-UmarDraz Жыл бұрын

    You pass JCheckBox() to super constructor in CustomCellEditor for just telling that there will only true or false happening Right ? But actual working is in getComponentMethod()

  • @LaingRaven

    @LaingRaven

    Жыл бұрын

    No, When you use "super(new JCheckBox())" The user just press one click on the cell table. But if you use "super(new JTextField())" User need press double click on cell table. If you use "super(new JCheckBox())" when you call table.getValueAt method it will return object as true or false. But you can custom it by override method getCellEditorValue in class custom cell editor and return object what you want.

  • @M-UmarDraz

    @M-UmarDraz

    Жыл бұрын

    @@LaingRaven yeah i understand your logic

  • @chinhbao6470
    @chinhbao64707 ай бұрын

    Hello, I have a problem when deleting the last row of a column. All columns other than the Action column are deleted but the Action column still exists and it prevents me from being able to operate it. Then I get an error message like Array Index Out Of Bounds Exception. Can you help me? There is my code, I try to delete in database, then I delete at index = row in Arraylist categories, finally I delete on JTable and reload to show data on Jtable: if (row != -1) { if (JOptionPane.showConfirmDialog(ListOfExpenseCategories.this, Constraints.CATEGORY_CONFIRM_DELETE_AN_EXPENSE, Constraints.LABEL_CONFIRM, JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { int result = CategoryDAO.getInstance().delete(categories.get(row)); if (result > 0) { JOptionPane.showMessageDialog(ListOfExpenseCategories.this, Constraints.CATEGORY_DELETE_SUCCESS, Constraints.LABEL_INFORMATION, JOptionPane.INFORMATION_MESSAGE); categories.remove(row); DefaultTableModel tblModel = (DefaultTableModel) table.getModel(); tblModel.removeRow(row); loadData(); } else { JOptionPane.showMessageDialog(ListOfExpenseCategories.this, Constraints.CATEGORY_DELETE_FAIL, Constraints.LABEL_ERROR, JOptionPane.ERROR_MESSAGE); } } }

  • @LaingRaven

    @LaingRaven

    7 ай бұрын

    You miss this step 9:35

  • @chinhbao6470

    @chinhbao6470

    7 ай бұрын

    @@LaingRaven oh, my bad. Thank you, very good video.