Is java easier or C#?

...

I would say that the language C# is a bit harder to learn, since they have the some c-r-a-p like the method modifiers; virtual, new, override etc. Inheritance in java is easier.
/Kaj

Similar Messages

  • Comparison between WebDynpro for ABAP vs. WebDynpro for Java ??

    Hi,
       Can someone tell me when should we go for WebDynpro for ABAP and when WebDynpro for Java. Is there any link where SAP recommends the one for the other.
    Thanks in advance
    Regards
    Mukesh

    Hi Mukesh,
    Both are having its own strengths!! )
    I think it all depends on your project requirement and the availabel resources.
    If the developer is good in OOPs ABAP then he must go for Web Dynpro ABAP. But if anyone is good in JAVA then that person should go for Web Dynpro JAVA.
    *In Short almost all Features supported in webdynpro ABAP are also Possible in webdynpro Java.
    1] Webdynpro Java
    Supports,
    webservice
    RFC Models
    Accessing Portal information in Java
    Easy sending E-mail
    Strictly follows MVC architecture which seperate Business logic and Process flow.
    Webdynpro Java is webbased programming model to develop SAP Applications.
    Easy to learn
    Easy to integrate in Enter prise portals.
    Dynanamic Programming
    *Easy access to R/3 Via RFC technology (Models)
    2] Web Dynpro ABAP
    As the name suggests Web Dynpro for ABAP uses exactly the same meta model as its cousin Web Dynpro for Java. A Web Dynpro component, a Web Dynpro view, a Web Dynpro model, a Web Dynpro controller have the same semantics both for ABAP and Java. The main difference is the designtime environment, the development infrastructure and the runtime environment.
    The designtime environment is properly embedded in the ABAP Workbench where Web Dynpro artifacts are simply a new category like BSP applications or classical dynpro based applications before. Also no surprises regarding the development infrastructure. The correction and transport system keeps track on all changes that are done, versions them and helps to propagate the Web Dynpro application from development to production like you would do with ordinary BSP or dynpro-based applications.
    Last not least the execution platform is the ABAP server that produces application content ready to be integrated in the NetWeaver Portal seamlessly. Features like portal eventing can be used between applications written in ABAP or applications developed with Java.
    Hope this helps and solve your Problem
    Cheers,
    Darshna.

  • Platform Invoke in SUN's Java

    The most of Java developer does not use (maybe cannot use) JNI. Because this API is very low and complex in use. But in some type applications developers need to call Native functions from system or other libraries. And the only decision is to write JNI code or to use some tools like xFunctions, JNIWrapper, etc. which are not easy. Why SUN does not developed something like Platform Invoke, which main idea is �declare� and "use"? For example, I want to call in C# function GetSystemMetrics I write code:
    value class Win32 {
    public
    [DllImport("User32.dll")]
    static int GetSystemMetrics(int);
    enum class SystemMetricIndex {
    // Same values as those defined in winuser.h.
    SM_CXSCREEN = 0,
    SM_CYSCREEN = 1
    and call it
    int main() {
    int hRes = Win32::GetSystemMetrics( safe_cast<int>(Win32::SystemMetricIndex::SM_CXSCREEN) );
    int vRes = Win32::GetSystemMetrics( safe_cast<int>(Win32::SystemMetricIndex::SM_CYSCREEN) );
    Console::WriteLine("screen resolution: {0},{1}", hRes, vRes);
    Very easy, semantic and syntax suitable to C#, no low level code like JNI.
    So I tried to prove that the same can be done in Java and wrote my Platform Invoke for Java. In my API I can write as follows:
    @NativeLibrary(name = "user32.dll")
    public class User32Lib extends CNativeLibrary {
    public static final int SM_CXSCREEN = 0;
    public static final int SM_CYSCREEN = 1;
    @NativeFunction(name = " GetSystemMetrics")
    public native int GetSystemMetrics(int);
    and in any Java method I can call this function:
    User32Lib user32 = new User32Lib();
    int hRes = user32.GetSystemMetrics(user32.SM_CXSCREEN );
    int vRes = user32.GetSystemMetrics(user32.SM_CYSCREEN);
    System.out.println("screen resolution: � + hRes + �,� + vRes);
    In my API I added hidden marshal of arrays and simple data structures, explicit marshal (Marshal class) for complex data structures and Delegate class that makes Thunk for Java methods used as callbacks of native functions. I do not claim that in this case JNI will not be used. But the most Java developers will be able to write code without JNI use.
    Message was edited by:
    vitallis
    Message was edited by:
    vitallis
    Message was edited by:
    vitallis
    Message was edited by:
    vitallis
    Message was edited by:
    vitallis

    JNative, See:
    http://jnative.free.fr/SPIP-v1-8-3/article.php3?id_art
    icle=4Thank you, but I am the developper of JNative ;)
    J/Invoke had been finished some day ago and should
    pass QA. It will be a part of OLEJA
    (http://www.simtel.net/product.php%5bid%5d93010%5bSite
    ID%5dsimtel.net) because J/Invoke supports calls to
    native functions from Virtual Table. That is COM
    native interfaces can be implemented in Java easy.So it is a commercial product. Our license terms are incompatible.
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Perl vs. Java

    What are the advantages and disadvantages for both using them for web services?

    What are the advantages and disadvantages for both
    using them for web services?What do you mean by "web services"?
    The popular press currently relagates certain types of activities to "web services." And most if not all of that is Java based.
    If, however you mean internet applications in general (or even intranet applications) then most sites world wide still either use Perl exclusively or make use of it to a significant degree. For example, at least several years ago, it was much easier to find a hosting service that would provide full Perl support vs Java support. And at least from recent ancedotal evidence, admins on hosting services are much more knowledgable about what Perl packages they will add for you (or not add due to security concerns) and able to provide usage examples than they are with Java.
    There are differences between the languages that have nothing to do with their usage. As mentioned (although not clearly) Java tends to produce more structured, and thus easily maintained code than Perl. With discipline you can do the same with Perl. A novice would find Java easier in that regard.
    Perl far exceeds Java in its ability to munge data (basically take data in one format and produce another.) Java however is probably better in certain limited areas with this however. For example it is probably a bit easier to use XML and some of its transforms in Java (not a lot easier but somewhat.)
    Java is better at providing a full application server. (Security considerations must still be met but that is true with Perl as well.)
    If you know either language very well, yet have no experience with web server performance (nor web server applications), then you are more likely to be able to get a Perl system to perform better from a small to medium sized user base (small to medium client throughput.)
    If you know neither language, then language problems (if not outright design problems) will have more impact on performance than anything that the actual server can do.
    If you are looking at a large user base, then regardless of language choice, you should find someone with experience in large user base projects to drive the project or it will probably fail. That person will have their own language bias so the problem would be self solving.

  • Seek help for install java under linux

    I have successfully installed java on linux , but not able to use many features tht i possibly could , such as jdbc , prblms on Mysql. most buggin prblm how do i set the compiler path to compile files from my home directory. i have to forcefully use the bin directory and run the complier given long address for the files. plz help.
    abhi

    abhi
    I don't know about your MySQL problems based on what you have posted - can you post any more specific information? Have you got the relevant MySQL drivers in your classpath? The drivers are available here:
    http://www.mysql.com/downloads/download.php?file=Downloads/Connector-J/mysql-connector-java-2.0.14.tar.gz
    the README in that file will give you installation instructions.
    how do i set the compiler path to compile files from my home directorySet the CLASSPATH environment variable to include whichever directories you like, eg (on bash) type:
    export CLASSPATH=$CLASSPATH:.:<your java dirs>To make java easier to run, put the directory in which it is installed into your path:
    export JAVA_HOME=<where you installed java>Then do
    export PATH=$PATH:$JAVA_HOME/binverify it has worked by simply typing
    javaYou can put all of these commands into the .*rc file for your shell, so that they are executed every time you open the shell. So if you are using bash you can put them into ~/.bashrc
    Read up setting the PATH and CLASSPATH for more info.
    HTH
    Matt

  • Bash shell does not recognise 'java', 'javac' commands (Linux command line)

    i' ve used javac and java compile & execute commands to build the same application on the DOS command line with Windows - no problem.
    But when I try to compile the same file on the command line under Linux Redhat (7.1) using Bash shell i get <bash: javac: command not found> and <bash: java: command not found>.
    In both cases I'm using j2sdk1.4.2 downloaded from java.sun.com for Windows & Linux respectively.
    I make sure I have both the javac and the file I want to compile in the same directory ../j2sdk1.4.2/bin for both the Windows and the Linux applications.
    Is there something I need to do to get bash to recognise javac, java etc? Is there a different setup procedure?
    Any angles on this are much appreciated ..

    Have you tried these correctly..
    Set the CLASSPATH environment variable to include whichever directories you like, eg (on bash) type:
    export CLASSPATH=$CLASSPATH:.:<your java dirs>
    To make java easier to run, put the directory in which it is installed into your path:
    export JAVA_HOME=<where you installed java>
    Then do
    export PATH=$PATH:$JAVA_HOME/bin
    verify it has worked by simply typing
    java
    You can put all of these commands into the .*rc file for your shell, so that they are executed every time you open the shell. So if you are using bash you can put them into ~/.bashrc
    Read up setting the PATH and CLASSPATH for more info.
    This shall resolve the issue .

  • Latest recommendation for custom screen development?

    easy points here  - get 'em while their hot!  : )
    I'm trying to confirm my thoughts/assumptions on the development of custom screens.  We are installing the various pieces of NW04s and expect the majority of our users to access ECC transactions through the SAP Portal (using Web GUI for HTML).  Also, we will have a significant number of custom screen requirements; some may be enhancements to existing SAP delivered screens; others may be new screen development.
    What is SAP's latest recommendation for custom screen development?
    More specifically, what are various options and their advantages and disadvantages?
    For example:
    **Web Dynpro for Java
    + easy Portal integration
    - requires NW Dev Studio/Infrastructure
    **Web Dynpro for Java
    + Development tools within Workbench
    - more difficult to integrate in the Portal
    **Z transaction development with Screen Painter
    **HTML/JavaScript or similar
    etc....
    Thanks,
    Brian

    Brian,
    For me , I have only two choices
    1. Web Dynpro for Java
             Great front end IDE to work with, only issue could be the performance issue, while Java is trying to communicate with SAP ECC.
    2. Web Dynpro for ABAP
              Relatively new, however a good tool to work with. Performance improvement compared to Java Web Dynpro.
    I don't think you should have a concern of integrating this with Portal, as you have a separate iView for ABA Web Dynpro. The screen can be developed on the SAP ECC and then can be called from the Portal screen.
    You still have other options like developing normal dynpro - but that will not give a look and feel of the web interface. BSP / PCUI are the other choices but given the roadmap of SAP for UI, I would stick to Web Dynpro for ABAP / Java.
    Please let me know if you have any questions.
    Regards,
    Ravi

  • How do I build this applet?

    I want to put a drag and drop design interface on my site like this one:
    http://www.ezbeads.com/cgi-bin/design.htm
    I am new to Java. What is the best way to create something like this? Is it easily learned? Or is there an applet out there that might work?
    Thanks,
    DC

    What is your goal ? If you need to develope using a secure tool then you should begin using C++ for basic trainment and as a second step begin to develope small applications on JAVA.
    In the site http://www.sun.com you maybe find tutorial for use and learn Java. Java is easy if you know oriented objects model.
    Good luck. Every people begin with the same question "Is Java easy to learn ...?"

  • I need Help with loop

    Hello everyone this is my first time posting here, i have always find java easy(up to this point), this is my first class in programming java i am just needing help with the "for loops" i cant seem to get the program generate 10 random math questions. if you guys can please help i will appreciate it, i have been working on it for a couple of hours. I am not finished with it yet but thats the only thing i need help with.
    import javax.swing.JOptionPane;
    public class Lab5
    public static void main(String[] args)
    int num1 = (int) (Math.random() * 100 + 1);
    int num2 = (int) (Math.random() * 100 + 1);
    int sum = num1 + num2;
    int product = num1 * num2;
    int quotient = num1 / num2;
    int difference = num1 - num2;
    for (int i = 0; i > 11; i++);
    int number = (int)(Math.random()*4);
    if (number == 0 )
    String s1 = JOptionPane.showInputDialog(null, num1 + " + " + num2 + "=" );
    if(number == 1)
    String s3 = JOptionPane.showInputDialog(null, num1 + " - " + num2 + "=" );
    if(number == 2)
    String s3 = JOptionPane.showInputDialog(null, num1 + " x " + num2 + "=" );
    if(number == 3)
    String s4 = JOptionPane.showInputDialog(null, num1 + " &divide; " + num2 + "=" );

    for (int i = 0; i > 11; i++);Two problems with this line:
    1) The second part of a For loop is the constraint. You have said that for the loop to be entered, i must be greater than 11. Well since you've also told i to begin at 0, this will never happen. Thus, the loop will never enter. You may have meant less than?
    2) You put a semicolon in the line. Semicolons are used to end statements. The For loop, when used as a block with curly braces, is not a single statement and does not require a semicolon. Here's the two structures of a basic For loop:
    for(int i = 0; i <= 100; i++) {
        //this is a block. you can put multiple statements in here and they are all part of the loop
        int a = 1;
        int b = i;
    //if your loop only needs to use a single statement, no braces are required
    for(int i = 0; i <= 100; i++)
        int a = i;

  • I don't like JavaFX script and here's why

    What designers need is not a new language, but a WYSIWYG editor and interface for drawing and animating graphics and text, (including 3D in the future), which then automatically generates good old Java!! I see nothing wrong with Java e.g. Box myBox=new Box(); mybox.height=500; mybox.width=600; window.add(myBox); I see this as equally concise and simple as JavaFX, and is fully object-oriented, and as such, fully property-editable ("declarative", as you would put it). And Java is widely known. And it is hugely powerful. Why Sun thinks JavaFX will be easy for designers is beyond me, given that it's a whole new syntax! Yuck! I hope therefore that when a WYSIWYG editor comes out for creating content, that there is at least the OPTION of translating to pure Java, which is just as easy and editable in EVERY respect as JavaFX. SUN, PLEASE CONCENTRATE ON A WYSIWYG EDITOR FOR 2D AND 3D GRAPHICS, which uses pure JAVA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! So that we can make fully object-oriented applications and design them easily but have ONE scheme of communication rather than the ActionScript/MXML mess that is Flash, or the C#/XAML mess that is WPF/Silverlight!!!!!!!!!!!
    Sun, promote your Java, don't destroy it! I can't help but think you made JavaFX because of the crappy Flash/MXML and Windows/XAML schemes, when you should have realised all along that Java is better and that by making a 2D and 3D graphics WYSIWYG editor, designers will absolutely love it and will be producing content immediately!! And.. we as developers NEED PURE Java.
    Regards, N

    muchacho wrote:I don't agree with your propose to a Java extension, I don't want Java to become more complex or bloated as C#.If you're talking about the code itself, it's less bloated, not more bloated, and its level of complexity is the same. As for the language, it's the exact same syntax as array declaration, so I disagree that it bloats or complicates Java given that it is a logical extension to array declaration.
    This is unlike e.g. C++ where the plethora of features can make code difficult to read.
    It is obviously only an option for coders, but where it is used, it makes the Java easier to read, not more difficult to read.
    If it was up to me, I'd implement the array declaration syntax to be extended to include objects immediately, since I'm beginning to think that I'd really like to use this way of starting objects!! Not just for GUIs, but all over Java!! It'd certainly make my Java more fun and readable!
    Here's the problem I have with the idea of JavaFX "complementing" Java: redundancy. Many features of JavaFX are in Java and vice versa. Therefore they are not complementary languages but compete directly. This is not a bad thing at all, but if they truly pursue JavaFX, they should ensure that both JavaFX and Java have full and complete functionality and full API access, so nobody can have a single regret if they go with either platform. For example: if I use Java I don't want to miss out on a Java API adaptation of the "bindable" functionality, or easy use of callbacks, and if I use JavaFX I don't want to miss out on fully object oriented functionality and structure, and access to ALL Java APIs, including third party and all old ones.
    If that happens, as it should, then I want JavaFX everywhere, including server side, and I won't touch Java again, including for 3D games, media applications, business systems, etc. etc., server and client side. I'd literally make the complete switch, because I'd much prefer to develop in one language than two. And I would also recommend JavaFX to others if they enquire and if they are starting from scratch because of some of its nicer features. It would have all the same functionality and performance anyway if Sun ensures it, right? And then I'd like to see it re-named something original like "Sun MagicScript" for its first official release because I don't think "JavaFX" really demarks it as a new and proper language, which it is.
    Then I would become a real "MagicScript" FAN and convert!! And I won't look back!
    If it doesn't offer the full object-oriented functionality or full API access as Java, or to be extra-safe, they should ensure that the WYSIWYG editor generates pure Java very, very well, as well as to cater for the existing Java-ites and scared people, allowing the option of both Java and "MagicScript" generation. I also truly look forward to this WYSIWYG editor (with the features I've described earlier) as my main request!
    All the very best!! :)
    N

  • Is there an easy way to call a java class from an applet?

    Does anyone know of an easy way to call a server based java class from an applet? Has anyone done it or came across it? If yes how/where?
    Cheers, Chris.

    I'm not sure about the issue. Are you talking about "servelets"? "RMI"? Take a look at those issues.

  • Some easy java help required

    Kay
    Say for example i had:
    public int[] i d= new int[3];
    {code}And i[0] was set to 3, i[1] was set to 5, i[2] was set to 4, and i[3] was set to 1.
    Basically in easier terms:
    {code:java}
    i[0] = 3;
    i[1] = 5;
    i[2] = 4;
    i[3] = 1;
    {code}Right, how would i make an alternative int like this:
    {code:java}
    int highestNumber = (*);
    {code}Basically i want (*) to select the biggest integer out of the i[] int. So in that case i would want it to automatically select i[1] as it has the largest amount, that's what i need help with.
    *ALSO*
    How could i reset all of those int's to 0 in one easy code?
    Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Ryan_Stanyer wrote:
    Can you tell me why that wouldn't work? Or what alternative method i can use to make something with the same function?You create an array of 3 elements but try to put 4 elements there.
    And also.
    Ryan_Stanyer wrote:
    int highestNumber = (*);
    {code}Basically i want (*) to select the biggest integer out of the i[] int. So in that case i would want it to automatically select i[1] as it has the largest amount, that's what i need help with.create a method
    int getMaximalItem(int []array) [
       //implementation goes here
    Ryan_Stanyer wrote:ALSO
    How could i reset all of those int's to 0 in one easy code?
    Thanks.Create a method like:
    public void setToZeros(int []array) {
       // implementation goes here
    }Put some effort into this task and then ask specific questions if somethings are still not working.
    Regards,

  • Code Sample: Easy RFC Lookup From XSLT Mappings Using a Java Helper Class

    Hi everyone,
    This is just a shameless plug for my article: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14">Easy RFC Lookup From XSLT Mappings Using a Java Helper Class</a>. I hope you're interested in reading it, and I welcome your comments in this thread.
    Kind regards,
    Thorsten

    Hi Stefan. Thanks for your post. I have already done that. It still does not work. As a base for my java helper class I have usesd Thorstens code.
    The problem is quite confusing. I will try to ouline both issues here.
    First of all, when try to test from within the Operation Mapping, I always get a java error saying it cannot find the communication channel (it is there and working because I have tested it with the RFCLookup in graphical mapping). I have found a way to work around this, and that is to uncheck the "Use SAP XMLToolkit" checkbox --> switch to test tab, enter my ReceiverService in the parameter tab (header parameter) --> switch back to Definition tab, check the "Use SAP XMLToolkit" checkbox --> switch to Test tab and run the test. Then the XSLT and call to java helper class will work. Of course this is not really something you want to do all the time. Maybe there is a bug.
    Secondly, it never works when I try to do it "live". I am using a file adapter to pick up one file, convert it and a file adapter to drop the converted file. I get the following error code in SXMB_MONI.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!--  Request Message Mapping   -->
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">TRANSFORMER_CONF_EX</SAP:Code>
      <SAP:P1>ATJ_Accounting2XML_Accounting.xsl</SAP:P1>
      <SAP:P2>http://rd.accounting.logica.com</SAP:P2>
      <SAP:P3>fd552c30-bad9-11dd-9761-c21dac1b818c</SAP:P3>
      <SAP:P4>-1</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>TransformerConfigurationException triggered while loading XSLT mapping ATJ_Accounting2XML_Accounting.xsl; http://rd.accounting.logica.comfd552c30-bad9-11dd-9761-c21dac1b818c-1</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Using an XSLT without a call to a java helper class, works just fine.
    I am totally at a loss here. Any more input would be much appreciated.
    /Patrik

  • A rapid and easy solution fot JAVA UI development.

    Hi, dear all:
    the UILOGIC issue a product named DUIL(dynamic User Interface logic), that can be used design the JAVA UI very easy, it can generate the complicated JAVA UI from a template definition, and it support i18n,
    what impress me most is the dynamically feature, that will enable you build relationship of components automatically, such as you want to let a button in your GUI only be valid when another editor have been input some text, DUIL can implement it very easy without write any java code.
    You can download it from http://www.uilogic.com/download/duil1.0.zip
    Perhaps we can design java DUI like design web interface with HTML.

    Thanks Mr_Silly_v2&omcgovern for your comments and suggestions,
    UILOGIC is a small organization now, but its product is innovative, and UILOGIC Dedicate to provide effort for the java world to simplify the UI design.
    Actually, DUIL's core feature is the "Dynamical" and i18n (The relationship of DUIL&JAVA is more like struts&JSP), that means the developer need not write code for that case (control the relationship of UI component), of course, you can control all of your UI components with native java code in small project, but the maintenance cost will be terrible if you project grow larger and larger, so DUIL can abstract your UI logic from the native java code, and you can assign different engineers to maintain them independently, this feature will reduce the maintenance cost.
    As for the complex of sample that Mr_Silly_v2 referred, it is because the GridBagLayout is more complex, DUIL's target is provide a mechanism for customer to maintain the larger UI project,
    As for the support page that omcgovern referred, we apologize for that, UILOGIC is prepareing a technical forum for developer in the near future.
    Thanks for you comments again, the growth of DUIL need your suggestion, we believe that DUIL will help you to design the UI easier and easier.

  • Easy swing question for Java friends

    Hi could somebody test this short application and tell me why the "DRAW LINE" button doesnt draw a line as I expected?
    thank you very much!
    Circuitos.java:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    import java.awt.geom.*;
    public class Circuitos extends JApplet {
         protected JButton btnRect;
         protected Terreno terreno;
         private boolean inAnApplet = true;
         //Hack to avoid ugly message about system event access check.
         public Circuitos() {
              this(true);
         public Circuitos(boolean inAnApplet) {
            this.inAnApplet = inAnApplet;
              if (inAnApplet) {
                   getRootPane().putClientProperty("defeatSystemEventQueueCheck",Boolean.TRUE);
         public void init() {
              setContentPane(makeContentPane());
         public Container makeContentPane() {
              btnRect = new JButton("DRAW LINE");
          btnRect.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                terreno.pintarTramo();
              terreno = new Terreno();
              JPanel panel = new JPanel();
              panel.setLayout(new BorderLayout());
              panel.add("North",btnRect);
              panel.add("Center",terreno);
              return panel;
         public static void main(String[] args) {
            JFrame frame = new JFrame("Dise�o de Circuitos");
              frame.addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(0);
              Circuitos applet = new Circuitos(false);
              frame.setContentPane(applet.makeContentPane());
              frame.pack();
              frame.setVisible(true);
    }Terreno.java:
    import java.awt.*;
    import javax.swing.*;
    import java.awt.geom.*;
    public class Terreno extends JPanel {
         Graphics2D g2;
         public Terreno() {
              setBackground(Color.red);
              setPreferredSize(new Dimension(500,500));
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
          g2 = (Graphics2D) g;
          g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);    
         public void pintarTramo () {     
              Point2D.Double start   = new Point2D.Double(250,250);
              Point2D.Double end     = new Point2D.Double(250,285);
              g2.draw(new Line2D.Double(start,end));            
    }

    I don't think the date I became a member has anything to do with it. Yes, I signed up a year ago to ask a question or two when I didn't know anything. It wasn't until recently have I started to use this forum again, only to try and help people as well as ask my questions. It took me a year to get to this point to where I can actually answer questions instead of just asking. So don't be silly and judge a person based on their profile.
    Secondly, I agree with you, the search utility is great. I use it all the time and usually I'll find my answers, but if I don't is it such a pain in the butt for you to see the same problem posted again?? I know how much you want people to use the resources available before wasting forum space with duplicate questions, but it's not going to happen. Some people are not as patient and you being a butt about it won't stop it.
    My point in general is that there are nice ways to help people and even rude ways, and your comments at times come across rude to me, even condescending. You have a lot of knowledge, therefore certain things seem trivial to you... but try to understand where some of the new people are coming from. The Swing tutorial is extremely helpful but if you don't understand the concept of programming or java that well... then it can be overwhelming and you don't know where to start. It's a huge tutorial and when people are stuck they just want an answer to their one question. Most figure it's easier to ask someone who already knows instead of reading an entire tutorial to get their answer.
    I've learned by both methods, by taking the time to research it myself and by asking a lot of questions. I have the time. Some don't. Please realize that not everyone is like you and they will continue to ask whether you like it or not. You have a choice, either help them or not.

Maybe you are looking for