I want to learn of how building java applications and so much more, but I have just started is there any videos or could someone teach me how I would be able to build that.
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
I want to learn of how building java applications and so much more, but I have just started is there any videos or could someone teach me how I would be able to build that.
Pick up a beginners book like Java - A Beginner's Guide by Herb Schildt. I found his programs and explanations to be very accessible to a beginner.
Thanks. I started from a book too. Now I just read articles on sites like techtarget, world 3 com and java website, oracle corporation, they have good examples both in coding and conceptual ideas. Really good foundation to start on. Lots of articles on the internet google search it. And they give lots of articles. Just start reading it and get the feel of what they are talking about. Containers for example, packaged all in one. Write once, run anywhere. I got the conceptual idea from a web site. So learning there is great.
So if I were to create a print program just for my pc. Apparently it is this chrome book I'm on. The JVM is already used. They've programmed it to accept and change website variables or functions for the client. I'm the server. And this print program would work well on the JVM. Website and printing the info or what ever there is on it. This would print all of my class files in Java. Websites.
Would this be the object for the whole class to print out? Representation of that file. Using the print class in Java. Print representation of the class file. So that it can print it accurately. Instead of some unusual name and number. Like it would print the whole document or profile of the person. And not come out name@23423fdp and would be an odd print out. Because the toString() method in object is called instead when printing. Obj would be for the whole class it is representing. Like the print out is for document12.pdf and it would come out accurately. Class Test would be the program then? Right?
Last edited by Helium c2; February 16th, 2024 at 01:48 AM.
You can start where I just did. Build a free website from www.webador.com/ and it's free. Any site you want. It has everything. My url is is the most interesting thing. This is my completed website. Almost complete. But the programming is C++. But the container used to transport picture files is Java. Network to network. Anywhere you want to go. There. But the URL is free given from them. Check it out. I just made this.
https://free-4630391.webadorsite.com/ But this is the website I have for free. The URL is a networking URL. Just like Java. They are the web host. So that's Java doing this URL.
I think on this site, not able to build a forum. Forums are different. I'll try to search other places if to see if they'll let me build a forum for free also like this one. But still waiting on building or putting together my Java forum. JSP.
Last edited by Helium c2; February 27th, 2024 at 05:41 PM.
How about how to drop and drag an object? I'll start. In Java
[code=Java]
import java.lang.Objects;
import java.awt.Container;
import java.lang.*;
//this program captures objects and carries it to another location on the screen
public class DropDrag(String obj) {
//I'm sorry again. I'll finish my program. I have to take time to write it. I cannot do this on top of my head and typing.
} //end class
[/Java]
--- Update ---
[code=Java]
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class DropAndDrag extends JFrame {
private JList list;
private JLabel label;
public DropAndDrag() {
super("Drop and Drag");
list = new JList();
list.setModel(new DefaultListModel());
list.addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
label.setText(list.getSelectedValue().toString());
}
});
label = new JLabel();
label.setText("Drop an item here");
setLayout(new BorderLayout());
add(list, BorderLayout.NORTH);
add(label, BorderLayout.SOUTH);
setSize(300, 300);
setVisible(true);
// Add a drag listener to the list
list.addDragGestureListener(new DragGestureListener() {
@Override
public void dragGestureRecognized(DragGestureEvent e) {
// Get the selected item
Object item = list.getSelectedValue();
// Create a transferrable object
Transferable transferable = new Transferable() {
@Override
public DataFlavor[] getTransferDataFlavors() {
return new DataFlavor[]{DataFlavor.stringFlavor};
}
@Override
public boolean isDataFlavorSupported(DataFlavor flavor) {
return flavor.equals(DataFlavor.stringFlavor);
}
@Override
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
return item.toString();
}
};
// Start the drag operation
e.startDrag(Cursor.getPredefinedCursor(Cursor.DEFA ULT_CURSOR), transferable);
}
});
// Add a drop listener to the label
label.addDropTargetListener(new DropTargetListener() {
@Override
public void dragEnter(DropTargetDragEvent e) {
// Accept the drop
e.acceptDrag(DnDConstants.ACTION_COPY);
}
@Override
public void dragOver(DropTargetDragEvent e) {
// Update the cursor
e.getDropTargetContext().setCursor(Cursor.getPrede finedCursor(Cursor.DEFAULT_CURSOR));
}
@Override
public void dropActionChanged(DropTargetDragEvent e) {
// Do nothing
}
@Override
public void drop(DropTargetDropEvent e) {
// Get the dropped data
Transferable transferable = e.getTransferable();
try {
String item = (String) transferable.getTransferData(DataFlavor.stringFlav or);
// Set the label text
label.setText(item);
// Accept the drop
e.acceptDrop(DnDConstants.ACTION_COPY);
} catch (UnsupportedFlavorException | IOException ex) {
// Do nothing
}
}
});
}
public static void main(String[] args) {
new DropAndDrag();
}
}
[/Java]
I'll try to explain. This is not C++. So on a java container. Java swing container. Studying the codes there are few @ overrides of which I'm not certain yet what they are. But the main method is still there at the end of the program. Few parameters. So I will suspect not windows just the application itself. Which is different.
@Override //this part overrides a value
public void valueChanged(ListSelectionEvent e) {
label.setText(list.getSelectedValue().toString()); //sets the value to toString(). Or representation of objects. Like text.
} // end method. Where the object is dropped. So I haven't memorized all of the writings yet to be a professional yet. But that's my objective here
Last edited by Helium c2; February 27th, 2024 at 06:30 PM. Reason: Add more information
To start building Java apps, learn basic Java concepts from online tutorials. Install JDK and an IDE like Eclipse. Practice with simple projects, gradually exploring Java APIs and frameworks like Spring for web development. Go to https://www.programminghomeworkhelp....on-assignment/ for support and guidance. Watch video tutorials and take online courses to deepen your understanding. Stay updated with the latest trends. With practice and perseverance, you'll master Java app development.