Hi i really needed your help. Can you make a video about how to make a jtable with disabled duplicate entry? For example when i put James in the jtable i shouldn't be able to put another one. Only limit it in 1?
@1BestCsharpblog16 сағат бұрын
import javax.swing.*; import javax.swing.table.DefaultTableModel; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.HashSet; public class UniqueEntryJTableDemo extends JFrame { private JTable table; private DefaultTableModel model; private JTextField textField; private HashSet<String> uniqueEntries; public UniqueEntryJTableDemo() { setTitle("Unique Entry JTable"); setDefaultCloseOperation(EXIT_ON_CLOSE); setSize(400, 300); // Initialize HashSet to store unique entries uniqueEntries = new HashSet<>(); // Create table model model = new DefaultTableModel(); model.addColumn("Name"); // Create JTable with the model table = new JTable(model); // Create JTextField for input textField = new JTextField(20); // Create JButton to add entry JButton addButton = new JButton("Add"); addButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { addEntry(); } }); // Create JPanel for input components JPanel inputPanel = new JPanel(); inputPanel.add(textField); inputPanel.add(addButton); // Add components to JFrame add(new JScrollPane(table), BorderLayout.CENTER); add(inputPanel, BorderLayout.SOUTH); } private void addEntry() { String entry = textField.getText().trim(); if (!entry.isEmpty() && !uniqueEntries.contains(entry)) { uniqueEntries.add(entry); // Add to HashSet model.addRow(new Object[]{entry}); // Add to JTable textField.setText(""); // Clear text field } else { JOptionPane.showMessageDialog(this, "Duplicate entry or empty string!", "Error", JOptionPane.ERROR_MESSAGE); } } public static void main(String[] args) { new UniqueEntryJTableDemo().setVisible(true); } }
@1BestCsharpblog20 сағат бұрын
▶ ▶ ▶ LEAVE A LIKE FOR MORE PROJECTS 👍👍👍 ▶ Create a Custom CheckBox: kzbin.info/www/bejne/l53OlImLh958rpo ▶ Create a Custom RadioButton: kzbin.info/www/bejne/a3fIeGmFna-aZ5I
@AdifyXКүн бұрын
super. 👏👏👏👏💫
@alwynnbelarmino82042 күн бұрын
java.sql.SQLException: Parameter index out of range (7 > number of parameters, which is 6). help!!
@1BestCsharpblog16 сағат бұрын
Make sure the number of placeholders (?) in your SQL query matches the number of parameters you're trying to set
@mcrazick86623 күн бұрын
straight to the point, great tutorial
@_soulsync8884 күн бұрын
Sir, in the datapanelvalues code is if i run it will have errors
@_soulsync8884 күн бұрын
how to resolve?
@jordanpandayjr.86354 күн бұрын
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not supported yet. f.
@cadellvritra71274 күн бұрын
i was plannign this as my admin dashboard crud , and i wanna make an another from for user for buying only and viewing how do i connect it to this frame?
@jimmy9676 күн бұрын
keep it up the channel saved me❤
@buturajbaptiste97216 күн бұрын
Thanks for giving this knowledge its good design in c#.
@powerbaqhang6 күн бұрын
this coding can i run using Visual Studio Code?
@1BestCsharpblog6 күн бұрын
yes
@1BestCsharpblog7 күн бұрын
▶▶▶ LEAVE A LIKE FOR MORE PROJECTS 👍👍👍
@user-bi8cl4ev5i8 күн бұрын
It is not for free and why login is required since registering is an option?
@1BestCsharpblog6 күн бұрын
Each user has their own contacts, and new users must register in order to manage their own contacts.
@pragathispragathis770410 күн бұрын
I am hearing this problem since a week sir please reply sir😢
@pragathispragathis770410 күн бұрын
Sir please reply sir🙏
@pragathispragathis770410 күн бұрын
Sir please reply sir🙏🙏🙏🙏🙏🥺
@1BestCsharpblog9 күн бұрын
use the image path to display it in another form (in a jlabel)
@pragathispragathis77048 күн бұрын
Thank you sir♥️🙇♂️
@pragathispragathis770410 күн бұрын
Same method image view another jframe side please tell me sir🙏🙏🙏🥺
@1BestCsharpblog9 күн бұрын
use the image path to display it in another form (in a jlabel)
@pragathispragathis77048 күн бұрын
Thank you very much sir♥️🙇♂️
@ChandanKumar-lj8go10 күн бұрын
Thanks you 👍
@SmitPatel-jy6qp11 күн бұрын
it is really posible to make web using c++ ??
@chfaizan252011 күн бұрын
Where the source code plz provide
@kriss298911 күн бұрын
Gracias
@user-uy1ev2oe7v11 күн бұрын
thank you ,its working, but how to add header ?
@andrabackbone35512 күн бұрын
Please make tutorial with flutter mysql... Thanks
@pragathispragathis770412 күн бұрын
It's worked thank you very much sir,i want , how to selected row data in another jframe side view the details with image.... please tell me sir 🥺🙏 please...i need the source code sir.
@1BestCsharpblog9 күн бұрын
use the image path to display it in another form (in a jlabel)
@pragathispragathis770412 күн бұрын
Sir, this same method, how to image view another jframe side.please tell me sir.
@1BestCsharpblog9 күн бұрын
use the image path to display it in another form (in a jlabel)
@1BestCsharpblog12 күн бұрын
▶Java expense and income tracker project with mysql database: kzbin.info/www/bejne/h2isXnd5qq6nZ7c ▶ Create a Custom CheckBox In Java Swing Using Graphics: kzbin.info/www/bejne/l53OlImLh958rpo
@pj_236213 күн бұрын
Your Work is so wonderful sir. Can you add some features in your system like The system will print the Weekly and monthly Expenses of the user, and other feature.
@streetfoodlovers573614 күн бұрын
Why no sound ?
@1BestCsharpblog14 күн бұрын
LEAVE A LIKE FOR MORE PROJECTS👍👍👍
@Shironinja00715 күн бұрын
could u make a tutorial for an language learning system
@Shironinja00715 күн бұрын
this was very informative thank you
@protobelt900116 күн бұрын
i'm still stuck 55:49 no one display data at datagrid but header showing the firstname, lastname and scores but no records at all per row
@DinoLopez17 күн бұрын
Great video, question would it be possible to have predefined shapes and be able to connect those, including labels that show properties to that particular link? This way can re-use and have multiple shapes linking like a workflow?
@sevincseferova217 күн бұрын
Danışanlardan daha açıqlayıcıdır😎👏🏻
@bestmusic50118 күн бұрын
Can i change the connection of the database from mysql to derby in the DB.class
@bestmusic50118 күн бұрын
I try to change the connection in the dbclass it runs but it does to go through the other jframes it just says running
@CosmeMayono19 күн бұрын
Can i get this for free im really poor and this will help me a lot to my capstone project because my groupmates are not helping me pls sir
@Engineer-Samibress19 күн бұрын
Thanks for your time keep going
@1BestCsharpblog19 күн бұрын
▶▶▶▶LEAVE A LIKE FOR MORE JAVA TUTORIALS 👍👍👍 ▶Java expense and income tracker project with mysql database: kzbin.info/www/bejne/h2isXnd5qq6nZ7c ▶ Create a Custom RadioButton In Java Swing Using Graphics: kzbin.info/www/bejne/a3fIeGmFna-aZ5I
@AnjaliSharma-gb7eb19 күн бұрын
good
@abdirizakahmed212121 күн бұрын
Good
@abderrahimsolbi279921 күн бұрын
LEAVE A LIKE FOR MORE PROJECTS
@1BestCsharpblog22 күн бұрын
▶ ▶ ▶ LEAVE A LIKE FOR MORE PROJECTS 👍👍👍
@netconfig99923 күн бұрын
thanks you for sharing
@SergeFalanka23 күн бұрын
Merci beaucoup pour cette leçon mais je voulais avoir le code. Donc dès que l'utilisateur choisi le pays dans le listbox ou combobox. Il a les détails suivants dans le textbox différents : capital pays, sa superficie, sa population, religion... Merci
@1BestCsharpblog25 күн бұрын
▶ LEAVE A LIKE FOR MORE PROJECTS 👍👍👍 ▶ Expense tracker project in java with mysql database: kzbin.info/www/bejne/h2isXnd5qq6nZ7c
@sellthingsonline26 күн бұрын
Amen.
@khanhhuyenkaraoke953826 күн бұрын
Java Project Tutorial - Make Login and Register Form Step by Step Using NetBeans And MySQL Database ,like 584