|
can i get some tutorials and sample projects ?
|
|
|
|
|
|
Hi all,
I'm doing a sort of academic work for university and I'm looking for how JPA manages different data stores (I have to compare and contrast this with ADO.NET)...
Does anyone can give me an advide for some docs explain this behavior? I've found only that Java connects to every and only JDBC data sources defining properties for conn. in persistence.xml or using a JNDI connection wherever the JDBC data source is mapper in the application server....
Thanks
Ste
Ste
|
|
|
|
|
once you've connected to the DB, the mechanics of storage are down to the database itself. What is being stored is well documented in theJPA specification [links at the end of the page][^]
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
|
Wow, Java with command prompt!! Sure bring back memories.
My favorite IDE for Java is always NetBeans[^]. But make sure you ask for permission if you want to use NetBeans in class, some basic Java is easier to grasp in command prompt.
Excuse me for my improper grammar and typos.
It's because English is my primary language, not my first language.
My first languages are C# and Java.
VB, ASP, JS, PHP and SQL are my second language.
Indonesian came as my third language.
My fourth language? I'm still creating it, I'll let you know when it's done!
|
|
|
|
|
Okay, thanks. will do.
Sir.Dre
|
|
|
|
|
For learning Java, I would recommend BlueJ[^]. It was designed specifically for use in education.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
use Eclipse - that's the classic one.
regards Torsten
I never finish anyth...
|
|
|
|
|
netbean is good editor for java .you can download it from oracle site
|
|
|
|
|
I would personally go for BlueJ. It is lightweight and it does not contain too many features that you may not utilize in the long run.
Netbeans is okay. There are tons of features available for you. Furthermore, it has several variation depending on what kind of language that you want to develop your program with. Netbeans is very useful if you want to use several languages.
I am not too sure about Eclipse though. The last time I used it is for testing out the Android emulator.
And all three of them are free!
|
|
|
|
|
Eclipse and NetBeans are the best IDE for java.
NetBeans provide good interface like visual studio of Microsoft.
|
|
|
|
|
hey guys I need to learn java asap
I am studying java from this link : http://download.oracle.com/javase/tutorial/
everything given over here is theoretical. I am facing problems in grasping the concepts. Can u suggest me some programs or small projects that will make me learn the language efficiently.
Thanks in advance
|
|
|
|
|
Do you have any programming experience? If so take a small project you've done once and port it in Java.
What are you actually going to do? Java is a huge language and there are many areas. Start off by learning the core system - Standard Edition - as anything you learn there is portable to most of the other areas.
Do you understand OO? The early parts of the Java tutorials are theoretical because they need to be. As well as giving you the language, they are teaching you the theory and there is a lot of theory to take on board.
At the end of the day, if you do choose to go through the Java tutorials, you will get a very good knowledge of the language and it is free. Alternatively, you could buy one of the myriad books on the language.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
hi...yes i have done C++, c# and asp.net before.....i am finding difficulty in theory because we tend to forget when we move forward without making any programs...i have done basics but finding difficulty since interfacing part...please help
|
|
|
|
|
If you've done C# then most of Java should be straight forward.
By interfacing do you mean the concept of design to an Interface ?
Unlike C++ , Java only supports single-inheritance and interfaces allow a way around that. An Interface is used to define the capabilities of the class, not the function.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
|
Hi to all I have a problem in repainting my JPanel. I am creating a ShapeApplication program that can draw a shape on a click of a button. I have different classes in my application.
JPanel1 extends JPanel = use to draw different shape
JPanel2 extends JPanel= use to put my components such as buttons, label, and etc..
JFrame extends JFrame= use to put my JPanel1 and JPanel2
I have also normal classes which I implemented on my own
Shape = my Parent Class
Rectangle extends Shape = subclass of Shape and having an attribute of a Rectangle shape such as height and width
Square extend Shape = subclass of Shape and having an attribute of a Square shape such as height and width
My problem now is that when I use a repaint in actionPerformed method under my JPanel2 which contain my button component there is no effect on my drawing class which is my JPanel1 class
I implemented it this way
JPanel1.repaint();
I initialize my button's ActionListener like this..
button.addActionListener(this);//I am confuse what would be in the parameter.
Can you give a hint on this one? Where do I get wrong?
|
|
|
|
|
Hi,
JFrame is the container of JPanels (Jframe.add(child);)
JPanel1 with own event listener
JPanel2 with own event listener
You must call JPanel1.repaint() in event listener of JPanel 2
You must call JPanel2.repaint() in event listener of JPanel 1
-----------------------------------------------------
referenz_of_button.addActionListener // no action commands, but all action vvents
(
new ActionListener()
{public void actionPerformed(ActionEvent e) // e is placeholder form actionevent type (see Class ActionEvent)
{
// do something ony for object with referenz_of_button
}
}
);
JButton supports ActionListener
JLabel supports ActionListener
JButton and JLabel support MouseListener , KeyListener etc.
----------------------------------------------------
only if you want to use labels (action commands) of buttons
public void actionPerformed(ActionEvent event)
{
String cmd = event.getActionCommand(); // get label of button, label is the action command
if (cmd.equals("label_of_button1"))
{
// do something für button1
}
if (cmd.equals("label_of_button2"))
{
// do something für button1
}
}
referenz_of_button1.addActionListener(this);
// label of button must be "label_of_button1"
referenz_of_button2.addActionListener(this);
// label of button must be "label_of_button2"
JButton supports ActionListener
JLabel supports ActionListener
|
|
|
|
|
I am confuse about your statement below
JPanel1 with own event listener
JPanel2 with own event listener
You must call JPanel1.repaint() in event listener of JPanel 2
You must call JPanel2.repaint() in event listener of JPanel 1
Can you give me some example on this one just a short code. I really don't get it..
Hi here is my code of my actionPerformed under JPanel2
JPanel1 jpanel1 = new JPanel1();
@Override
public void actionPerformed(ActionEvent e) {
if (e.getSource() == btnOK) {
jpanel1.repaint();
}
}
|
|
|
|
|
Hello twseitex I manage to solve my issue on "Repaint JPanel problem in java". The problem is I just put all of my two classes (JPanel1 and JPanel2) directly on a JFrame which make my button doesn't send any event on my JPanel1 class because they are on separate classes. Yes your right I now understand what you mean on your statement.
JFrame is the container of JPanels (Jframe.add(child);)
JPanel1 with own event listener
JPanel2 with own event listener
You must call JPanel1.repaint() in event listener of JPanel 2
You must call JPanel2.repaint() in event listener of JPanel 1
This makes me think if I will just and my JPanel1 class on my JPanel2 class which handles all the event this will be done. In this case I will shorten my codes by not implementing each class with their own event listener and I am right I have fix the issue. This is really a great lesson for me as a newbie programmer.
If you want to see my initial ShapeApplication heres the link for the jar file Click Here
|
|
|
|
|
Hi,
JFrame have repaint from Component.
JPanel have repaint form JComponent,and Component.
Repaint JFrame (contianer) or repaint Jframes.
You want repaint JFrames. Change GUI of JPanel1 and call Jpanel1.repaint() ...
Same thing with other words.
To connect 2 JPanels in (a) different classes you must have references of this objects to create
a handler to manage events of this JPanels or (b) put all classes into same container class.
(a) Constructor create instancte of class.
Inside of class you can save pointer of class itself into a global variable.
Read out this variable after create instance of class: use a global function of
class to get pointer of class istself. And this pointer use for e.g. repaint() for this instance.
(b) Or put all classes into same container class.
I use (a) in my java audio player. 1 main class for audio, 1 main class for GUI (JPanels etc.).
1 main class for applet. Applet call constructors of Audio and GUI, and after call functions
of classes to get references of instances of audio and GUI and save this pointers inside of
applet class. To be shure that classes have a pointer i read out saved pointer in applet.
(Pointer default is null bevore instances of audio an GUI are created.) So applet class
can manage connections between Adio and GUI classes (instances).
And to connect this different classes i use references of instances. Other reason for that: I must
synchronize events of audio with events of GUI (e.g. change tooltip text of buttons if
audio change). It is for me not possbile to put all classes into same container class.
In Audio and GUI classes i use threads in own content of class. Mixing of ressources (like threads)
of classes not possible. And: If create of Audio instance and or GUI instance failed,
applet ends. This i check inside of applet class.
P.S. Sorry for my english. I come from germany.
|
|
|
|
|
I am a newbie in programming . I just research about an advance topic of this java programming language and I came cross this question and puzzled me.
What is tracking multiple instances?
What do this mean in java?
|
|
|
|
|
flashery wrote: What is tracking multiple instances? What do this mean in java?
As it stands, it means nothing.
If you can give a bit more detail about the context of the question, people may be able to shed some light.
|
|
|
|
|
Hi, if you mean "synchronized" see http://www.jguru.com/faq/view.jsp?EID=226112
|
|
|
|