A simple Java Swing application for interacting with MySQL databases.
- Login Page: Prompts for MySQL username and password at startup instead of using default credentials.
- Database Selection: Automatically loads and displays available databases on startup. The first database is selected by default.
- SQL Query Execution: Enter and execute SQL queries in the text area.
- Result Filtering: Filter the query results by entering a search term.
- Enhanced Table Display:
- Larger display area (1000x400) to accommodate long column names
- Auto-resize columns to fit content when selected
- Click column header to auto-resize that column
- All columns auto-resize after query execution
- Table Zoom & Navigation:
- Ctrl + Mouse Scroll on results table: Zoom in/out (0.5x to 3.0x scale)
- Shift + Mouse Drag on results table: Pan around zoomed content
- Horizontal & Vertical Scrollbars: Always visible for easy navigation
- Keyboard Shortcuts:
- Enter in query area: Execute query (and apply filter if filter field has text)
- Enter in filter field: Execute query if filter is empty, or apply filter if has text
- Shift + Enter in query area: Insert new line
- Export Options:
- Export results to CSV file
- Java Development Kit (JDK) 8 or higher
- MySQL database server running on localhost:3306
- Valid MySQL username and password (entered at login)
- Double-click
run_app.batin the project directory. - The application will automatically download the MySQL connector.
- Enter your MySQL username and password in the login dialog.
- The first available database will be selected automatically.
- Enter your SQL query and press Enter or click "Execute Query".
- Columns auto-resize automatically after query execution to fit content.
- Click any column header to resize that specific column to fit its content.
- Use the filter field and press Enter to filter results.
- Zoom the results table: Hold Ctrl and scroll mouse wheel on the results table.
- Pan around zoomed content: Hold Shift and drag on the results table.
- Use the horizontal and vertical scrollbars to navigate large datasets.
- Use the export button to save results to CSV.
src/main/java/DBMSGuiApp.java- Main application with GUI and database connectivity.run_app.bat- Batch file to compile and run the application.pom.xml- Maven configuration (optional, for IDE integration).
- MySQL Connector/J 8.0.27
- Java Swing (included in JDK for GUI)
- Ensure your MySQL server is running before starting the application.
- The filter functionality is client-side and works on the currently displayed results.
- For security, avoid using this application with production databases directly; use appropriate user permissions.