Dp Chovati

+ Follow
since Jan 21, 2019
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dp Chovati

I am trying to design a search box with JTextField and JButton. For example, if I type "TEA" in JTextField and click on Jbutton, as a result, it will pop up a window showing all the options for tea.
1 day ago
3 days ago
I am using Jtable and I want to scroll down the screen with an on-click event on a cell of the table. Whenever I am clicking on a cell, the screen is not scrolling down, but when I manually scroll down the screen with below code, the screen is not possible to scroll up.

    DefaultTableModel tableModel = new DefaultTableModel(23,23);
    JTable table = new JTable(tableModel);
    JScrollPane scrollPane = new JScrollPane(table);
    scrollPane.getVerticalScrollBar().setPreferredSize(new Dimension(30,0));
    table.addMouseListener(new java.awt.event.MouseAdapter()

   public void mouseClicked(java.awt.event.MouseEvent e)
       AdjustmentListener() {public void
       adjustmentValueChanged(AdjustmentEvent e) {  
1 week ago
I am getting below error. How can I resolve it?

java.sql.SQLException: Could not retrieve transation read-only status server

Could not retrieve transation read-only status server

Communications link failure

The last packet successfully received from the server was 2,518,317 milliseconds ago.  The last packet sent successfully to the server was 2,518,333 milliseconds ago.

Connection reset by peer: socket write error

Hi Rob, thanks for sharing tutorial. I am referring to that.
2 weeks ago

I have used Intercellspacing for a table so that I can keep some margin with cells of a table. In the attached picture, How can I set a border around the selected area of cell?
2 weeks ago
How to add the data to a particular cell in Jtable?
2 weeks ago
How to add a button in the rows of Jtable?

                       DefaultTableModel tableModel = new DefaultTableModel(20,5);
                       JTable table = new JTable(tableModel);
                       table.getColumn(0).setCellRenderer(new ButtonRenderer());
                       table.getColumn("Button").setCellEditor(new ButtonEditor(new JCheckBox()));

In the above code, getting an error saying that ButtonRender and ButtonEditor symbol cannot find.
2 weeks ago
Currently, I am using a Card layout, when I am trying to use Box layout or Grid Bag Layout. Nothing is showing up in the respected Jpanel.Is there are any changed I can do? So far, As per my understanding, Japnel is set for Card layout and Buttons are using ComponentOrientation.
3 weeks ago
@Tim Moores, Thank you so much for guidance. it is a big java project, but I have started working on code to develop an understanding about it.
3 weeks ago
I am working on a layout that is set to use "Class ComponentOrientation". That displays all the button from LEFT_TO_RIGHT and RIGHT_TO_LEFT. In short, buttons are displaying in Horizontal orientation. I want to display buttons in a vertical orientation. So far, I researched that ComponentOrientation comes with fields LEFT_TO_RIGHT, RIGHT_TO_LEFT and Unknown, but all the fields are displaying component in a horizontal orientation. Is there any way to display button in verticle orientation using Class ComponentOrientaion?
3 weeks ago
I am working on a java project, I need to change features in the project. I am not sure where to start for that. The code is written by someone, so I am not able to understand.
3 weeks ago